Skip to content

A079756

OEIS Lean4

Operation count to create all permutations of n distinct elements using the “streamlined” version of Algorithm L (lexicographic permutation generation) from Knuth’s The Art of Computer Programming, Vol. 4, chapter 7.2.1.2. Sequence gives number of interchanges in reversal step.

offset: 3
codomain: ℕ
n3456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
A079756004292151734156301563271719637206356882682640043755696121563354418999013670704741532324019817027581832356717952405481477765451048109629555310522201030222066152272484226648854553501731113721292365473054199267293110167713533010066682327754192838325254141737405216090137964566103946909940834433725043284836513134783433641443012119754544380908719575601847351472882140114272615872680554205441864645773542451092053097180368697804023071133584349456991097717983297287425837408283532080706224693448810485099412718816400907440116395772595564934291445158574031760404073852040844772700729160257086651433745466586734704118172268045929512206103048582263709184052372373923602253214638319158461260209489939901502091030987875370894447179989148170107656158581550273535150148357778871995659268043062463432620110102144115608266893375182202998976556100073742451494260528555472095217576525259570153562030971829628343260272788530009435579058616151660316733178867401958911452002695320415165478579110673053936259870165686277651534012128941868244653605998028742713169415745588258442370564557931325939254065875909322164805793124297059897691114165342227723191449410961677381417458722768419618152015553479936426930713189571726160514308038018692884141671296847426205168849196049462890145818652010938629159513229418935456330131025844245980247314450729093260054693145797566147094677281762766823180565449926130369871837562627893504356758735018285413700177347480538940339615877923333555325665046222655145422095084151241042818416468563837999641529936678432260247449800722707371039460015775398499448930244725198064261658063534205336228923902619803613084085187164615469691163459885893534391193494381293492590814644089198719624685294067593063027051537536100379259068356853524355850856200689951282989823764677993417459254193763955772161776689634065088828349880343932722313041995458664577501012636743238309434785383047998775775152044293059948097894156435736602545510395974556785106025665233759983192777073397061329053693777575522970845955018512925358473407106361539914025598991566624403823679743221626654531378250757301110777152218668778334880539347555615384855640886332444643365192259264140732961953677574080121355746425676259343954844815386104973495261156788864192007437672544364112800959298513854120248176043386691552233693246133302014528776984440964685733702949391064604358081795466369588326677674825934295636775253132892984172700422173988695698876102813467891725346355314023241234048863685729216390391453638043971225527441309265220426946682875412962149474234507255339214472250032581282817658359401109021008848111264115045481784810697772555018672991571198610772736964075218294594878311007987430440759282345469570804727958231675076118625111145106841505532546113557114844032451725148543145269971631199491930814721501159753905176066507560004737206388174568183544092423823916903524947702362804255276494322621578358002301945714858902164252051604447172219772848086469667674183246746339165396297869354602583510485060161136200040123151497867736639157492276038722141393464048670105189900807431371487241767834292444392714406702028487437563488447263801933944387478799418032941150424757367285813505874708140728406905599627543728254605109550457117059819257541177940285952357516404703981007287811864385928853694273173704108772810692162586172997183369545617414250580471675811604744562139480945945392980779645587351733762148541040491879912200313768017915693463759431106879353537568587035584216046107094590447355847341905138003216114057803689099341502353260134367700978195998981228308688552126147044004195041391888739990443979847904882444246683930803715499541788477702119452743428961864625457976901851371332238832301818717543297926418644828867594820699466267188609346471771278306319786124403006634048785722198344406963914628919541859968377238260654296651672396014558368840711529024798159707892943317703434517736938540720536692081501492556846438069375018018225916894354821192851501111384162107929590546169235425220985713269015115308325764293536652011940454771504555000144145807335154838569542812008891073296863436724369353883401767885706152121220224974386907776468812967176836491868955011675810394147541924132967772720176937045938374673917664555543198742198321819148220478997264376704426633085005923332543109574164523200984377789033573630545088377669467232612484935545422968602623891704683169975677294326646741054605549163660107809465565542568170335648978661133524233534656578030683624965027010639401778301149196914277956892723438326248586866129747449055995107505575726308194514207535216035616911152554577424497062268893709749377296532871612136263358814922577311298836210285331697595841379739367361965337076404933630274374479671390810822502928559653286970702052944304104371864885808334164877169991408453852599324235865758559312901898857082429220359620525173960973073525185613018267948037655321362990803522450653250723443137892525354851761412085203209946602224652005661713421712869856901346046573966911483325893114792760129589335799070997565748606366299613454223122695500426349788247530099576937649823078111073254740731845209850908821053267859410176289140386513471117318783351625966600665597425857919899537945131154030178862347450834253951885519671925134223676730885073740839487505689733494400071064005586905016463369940599037683272127909584150618038627160976112705750828556696967704732620801309057796566366755538755120760144960067727582450840835649816666459451242917776363977215770624151507164882625622332539865942406113066849291912425948753937475402671598917319136616711753585477356879783133314269514348435425485903850897421938659169201557254593667666701362402150134855943187285362247737045787100393360568737876849834493941898198313982270648344044945701890581334602402953027357448246772110930032267033999625416027164175386890395452582003365825328926229564468444243053843064151433344094434022489597771464545262587758457160013519657842742303310119596478910655343248636769717254270831638758091906558320144502203090115091094386167688971232136511788289131799945837053430201284367495060518814461361665496512257608620493123139155729005682018731123040841942722114966510487450610720981412382851051316757566527948003571292993232992795258098061882907198876651767304275673398213589499845454737981878119212594414404515175151728270923993519700113655197772548395321095634641542034360030114003551200264199829103522142851474031962671818148500910958424217756362613040611642487164869370550551364930611138209381709742741467372194871119367282951172348017625891583252145169999444455132341838178553089273925573340123536529940205526062293220676845045851281305026827287892645314052698472922408173610121660624537449632667419623718299450010581018419796767558381186317606722301169305