cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-30 of 96 results. Next

A276326 Numbers expressed in greedy A001563-base.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 140, 141, 200, 201, 202, 203, 210, 211, 212, 213, 220, 221, 222, 223, 230, 231, 232, 233, 240, 241, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333, 340, 341, 400
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

Terms A001563(1) = 1, A001563(2) = 4, A001563(3) = 18, ... give the base values for the digit positions from 1 onward. Digit places are filled by always trying to find the largest possible term of A001563 that still fits into the sum.
A130744(8) = 3225600 = 10*A001563(8) is the first number which yields an ambiguous representation when expressed in decimal, because in this base it is actually "A0000000" (where digit "A" stands for ten).

Examples

			To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:
  ----------------
   n         a(n)
  ----------------
   0           0
   1           1
   2           2
   3           3
   4          10
   5          11
   6          12
   7          13
   8          20
   9          21
  10          22
  11          23
  12          30
  13          31
  14          32
  15          33
  16          40
  17          41 (as 4*A001563(2) + 1*A001563(1) = 17)
  18         100 (as 1*A001563(3) + 0*A001563(2) + 0*A001563(1) = 18)
and:
3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).
		

Crossrefs

Cf. A276327 (the least significant nonzero digit).
Cf. A276328 (the sum of digits).
Cf. A276333 (the most significant digit).
Cf. A276336 (a largest digit).
Cf. A276337 (number of nonzero digits).
Cf. A033312 (repunits).
Cf. A276091 (no digits larger than one).
Differs from A007090 for the first time at n=16 and from A055655 at n=18.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[FromDigits@ f@ n, {n, 72}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276326 n) (let loop ((n n) (s 0)) (if (zero? n) s (let ((dig (A276333 n))) (if (> dig 9) (error "A276326: ambiguous representation of n, digit > 9 would be needed: " n dig) (loop (A276335 n) (+ s (* dig (expt 10 (- (A258198 n) 1))))))))))

A104357 a(n) = A104350(n) - 1.

Original entry on oeis.org

0, 1, 5, 11, 59, 179, 1259, 2519, 7559, 37799, 415799, 1247399, 16216199, 113513399, 567566999, 1135133999, 19297277999, 57891833999, 1099944845999, 5499724229999, 38498069609999, 423478765709999, 9740011611329999
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    A104350[n_] := Product[FactorInteger[k][[-1, 1]], {k, 1, n}]; Table[A104350[n] - 1, {n, 1, 50}] (* G. C. Greubel, May 09 2017 *)
    FoldList[Times,Table[FactorInteger[n][[-1,1]],{n,30}]]-1 (* Harvey P. Dale, May 28 2018 *)

Formula

a(n) = (a(n-1) + 1) * A006530(n) - 1 for n>1, a(1) = 0;

A275806 a(n) = number of distinct nonzero digits in factorial base representation of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 4, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2016

Keywords

Examples

			For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
For n=2, with factorial base representation "10", there is one distinct nonzero digit, thus a(2) = 1.
For n=3, with factorial base representation "11", there is just one distinct nonzero digit, thus a(3) = 1.
For n=44, with factorial base representation "1310", there are two distinct nonzero digits ("1" and "3"), thus a(44) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Length[Union[Select[s, # > 0 &]]]]; Array[a, 100, 0] (* Amiram Eldar, Feb 07 2024 *)
  • Python
    from sympy import prime, primefactors
    from operator import mul
    import collections
    def a007623(n, p=2): return n if n
  • Scheme
    (define (A275806 n) (A001221 (A275735 n)))
    

Formula

a(n) = A001221(A275735(n)).
a(n) = A060502(A225901(n)).
Other identities. For all n >= 0:
a(n) = a(A153880(n)) = a(A255411(n)). [The shift-operations do not change the number of distinct nonzero digits.]
a(A265349(n)) = A060130(A265349(n)).
a(A000142(n)) = 1.
a(A033312(n)) = n-1, for all n >= 1.

A139172 a(n) = n!/2 - 1.

Original entry on oeis.org

0, 2, 11, 59, 359, 2519, 20159, 181439, 1814399, 19958399, 239500799, 3113510399, 43589145599, 653837183999, 10461394943999, 177843714047999, 3201186852863999, 60822550204415999, 1216451004088319999, 25545471085854719999, 562000363888803839999, 12926008369442488319999
Offset: 2

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Natural numbers of the form (n!-m)/m:
for m=1 n!-1 see A033312;
for m=3 (n!-3)/3 see A139173;
for m=4 (n!-4)/4 see A139174;
for m=5 (n!-5)/5 see A139175;
for m=6 (n!-6)/6 see A139176;
for m=7 (n!-7)/7 see A139177;
for m=8 (n!-8)/8 see A139183;
for m=9 (n!-9)/9 see A139184;
for m=10 (n!-10)/10 see A139185.
From Artur Jasinski, Oct 14 2008: (Start)
a(n) = Number of numbers removed in first step of Eratosthenes's sieve for n!
a(5)=A145532(1), a(6)=A145533(1), a(7)=A145534(1), a(8)=A145535(1), a(9)=A145536(1), a(10)=A145537(1). (End)
Generally, for n >= m, the formula a(n) = n*(a(n-1) + 1) - 1 applies to all natural numbers of the form (n!-m)/m, m >= 2. - Bob Selcoe, Mar 28 2015

Crossrefs

Programs

Formula

a(n) = Sum_{k=1..floor(n/2)} s(n,n-2*k), where s(n,k) are Stirling numbers of the first kind, A048994. - Mircea Merca, Apr 07 2012
a(n) = n*(a(n-1) + 1) - 1. - Bob Selcoe, Mar 28 2015

A139175 a(n) = (n! - 5)/5.

Original entry on oeis.org

23, 143, 1007, 8063, 72575, 725759, 7983359, 95800319, 1245404159, 17435658239, 261534873599, 4184557977599, 71137485619199, 1280474741145599, 24329020081766399, 486580401635327999
Offset: 5

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original name: Natural numbers of the form (n!-5)/5.

Crossrefs

Programs

  • Magma
    [(Factorial(n)-5)/5: n in [5..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Mathematica
    Table[(n! - 5)/5, {n, 5, 20}]
  • PARI
    for(n=5,25, print1((n! -5)/5, ", ")) \\ G. C. Greubel, Oct 18 2018

Formula

E.g.f.: (120 - 60*x^2 - 40*x^3 - 15*x^4 + 19*x^5)/(120*(1-x)) - exp(x). - G. C. Greubel, Oct 18 2018

Extensions

Corrected offset from 4 to 5 by Vincenzo Librandi, Jul 20 2011
New name from Jon E. Schoenfield, Oct 18 2018

A139176 a(n) = (n! - 6)/6.

Original entry on oeis.org

0, 3, 19, 119, 839, 6719, 60479, 604799, 6652799, 79833599, 1037836799, 14529715199, 217945727999, 3487131647999, 59281238015999, 1067062284287999, 20274183401471999, 405483668029439999
Offset: 3

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original name: Natural numbers of the form (n!-6)/6.

Crossrefs

Programs

  • GAP
    List([3..25],n->(Factorial(n)-6)/6); # Muniru A Asiru, Oct 20 2018
  • Magma
    [(Factorial(n)-6)/6: n in [3..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Maple
    seq((factorial(n)-6)/6,n=3..25); # Muniru A Asiru, Oct 20 2018
  • Mathematica
    Table[(n! - 6)/6, {n, 3, 20}]

Extensions

New name from Jon E. Schoenfield, Oct 19 2018

A139177 a(n) = (n! - 7)/7.

Original entry on oeis.org

719, 5759, 51839, 518399, 5702399, 68428799, 889574399, 12454041599, 186810623999, 2988969983999, 50812489727999, 914624815103999, 17377871486975999, 347557429739519999
Offset: 7

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original name: Natural numbers of the form (n!-7)/7.

Crossrefs

Programs

  • GAP
    List([7..25],n->(Factorial(n)-7)/7); # Muniru A Asiru, Oct 20 2018
  • Magma
    [(Factorial(n)-7)/7: n in [7..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Maple
    seq((factorial(n)-7)/7,n=7..25); # Muniru A Asiru, Oct 20 2018
  • Mathematica
    Table[(n! - 7)/7, {n, 7, 20}]

Extensions

New name from Jon E. Schoenfield, Oct 19 2018

A139183 a(n) = (n! - 8)/8.

Original entry on oeis.org

2, 14, 89, 629, 5039, 45359, 453599, 4989599, 59875199, 778377599, 10897286399, 163459295999, 2615348735999, 44460928511999, 800296713215999, 15205637551103999, 304112751022079999
Offset: 4

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original name: Natural numbers of the form (n!-8)/8.

Crossrefs

Programs

  • GAP
    List([4..25],n->(Factorial(n)-8)/8); # Muniru A Asiru, Oct 20 2018
  • Magma
    [(Factorial(n)-8)/8: n in [4..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Maple
    seq((factorial(n)-8)/8,n=4..25); # Muniru A Asiru, Oct 20 2018
  • Mathematica
    Table[(n! - 8)/8, {n, 4, 20}]

Extensions

New name from Jon E. Schoenfield, Oct 19 2018

A139184 a(n) = (n! - 9)/9.

Original entry on oeis.org

79, 559, 4479, 40319, 403199, 4435199, 53222399, 691891199, 9686476799, 145297151999, 2324754431999, 39520825343999, 711374856191999, 13516122267647999, 270322445352959999, 5676771352412159999, 124888969753067519999
Offset: 6

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original name: Natural numbers of the form (n!-9)/9.

Crossrefs

Programs

  • GAP
    List([6..25],n->(Factorial(n)-9)/9); # Muniru A Asiru, Oct 20 2018
  • Magma
    [(Factorial(n)-9)/9: n in [6..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Maple
    seq((factorial(n)-9)/9,n=6..25); # Muniru A Asiru, Oct 20 2018
  • Mathematica
    Table[(n! - 9)/9, {n, 6, 20}]

Extensions

New name from Jon E. Schoenfield, Oct 19 2018

A002051 Steffensen's bracket function [n,2].

Original entry on oeis.org

0, 0, 1, 9, 67, 525, 4651, 47229, 545707, 7087005, 102247051, 1622631549, 28091565547, 526858344285, 10641342962251, 230283190961469, 5315654681948587, 130370767029070365, 3385534663256714251, 92801587319328148989, 2677687796244383678827, 81124824998504072833245, 2574844419803190382447051
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of ways to arrange the blocks of the partitions of {1,2,...,n} in an undirected cycle of length 3 or more, see A000629. - Geoffrey Critzer, Nov 23 2012
From Gus Wiseman, Jun 24 2020: (Start)
Also the number of (1,2)-matching length-n sequences covering an initial interval of positive integers. For example, the a(2) = 1 and a(3) = 9 sequences are:
(1,2) (1,1,2)
(1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,2)
(2,1,3)
(2,3,1)
(3,1,2)
Missing from this list are:
(1,1) (1,1,1)
(2,1) (2,1,1)
(2,2,1)
(3,2,1)
(End)

Examples

			a(4) = 9. There are 6 partitions of {1,2,3,4} into exactly three blocks and one way to put them in an undirected cycle of length three. There is one partition of {1,2,3,4} into four blocks and 3 ways to make an undirected cycle of length four. 6 + 3 = 9. - _Geoffrey Critzer_, Nov 23 2012
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Steffensen, J. F. Interpolation. 2d ed. Chelsea Publishing Co., New York, N. Y., 1950. ix+248 pp. MR0036799 (12,164d)

Crossrefs

A diagonal of the triangular array in A241168.
(1,2)-avoiding patterns are counted by A011782.
(1,1)-matching patterns are counted by A019472.
(1,2)-matching permutations are counted by A033312.
(1,2)-matching compositions are counted by A056823.
(1,2)-matching permutations of prime indices are counted by A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns are counted by A000670 and ranked by A333217.
Patterns matched by compositions are counted by A335456.

Programs

  • Mathematica
    a[n_] := Sum[ k!*StirlingS2[n-1, k], {k, 0, n-1}] - 2^(n-2); Table[a[n], {n, 3, 17}] (* Jean-François Alcover, Nov 18 2011, after Manfred Goebel *)
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!GreaterEqual@@#&]],{n,0,5}] (* Gus Wiseman, Jun 24 2020 *)
  • PARI
    a(n) = sum(s=2, n-1, stirling(n,s+1,2)*s!/2); \\ Michel Marcus, Jun 24 2020

Formula

[n,2] = Sum_{s=2..n-1} Stirling2(n,s+1)*s!/2 (cf. A241168).
a(1)=0; for n >= 2, a(n) = A000670(n-1) - 2^(n-2). - Manfred Goebel (mkgoebel(AT)essex.ac.uk), Feb 20 2000; formula adjusted by N. J. A. Sloane, Apr 22 2014. For example, a(5) = 67 = A000670(4)-2^3 = 75-8 = 67.
E.g.f.: (1 - exp(2*x) - 2*log(2 - exp(x)))/4 = B(A(x)) where A(x) = exp(x)-1 and B(x) = (log(1/(1-x))- x - x^2/2)/2. - Geoffrey Critzer, Nov 23 2012

Extensions

Entry revised by N. J. A. Sloane, Apr 22 2014
Previous Showing 21-30 of 96 results. Next