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.

Showing 1-10 of 15 results. Next

A061836 a(n) = smallest k>0 such that k+n divides k!.

Original entry on oeis.org

1, 5, 4, 3, 4, 5, 6, 5, 4, 6, 5, 7, 6, 7, 6, 5, 8, 7, 6, 5, 4, 7, 8, 7, 6, 5, 9, 8, 7, 7, 6, 9, 8, 7, 6, 5, 9, 8, 7, 6, 8, 7, 6, 11, 10, 9, 10, 9, 8, 7, 10, 9, 8, 7, 6, 5, 7, 13, 12, 11, 10, 9, 8, 7, 8, 7, 6, 13, 12, 11, 10, 9, 8, 7, 6, 9
Offset: 0

Views

Author

Robert G. Wilson v, Jun 22 2001

Keywords

Comments

Comments from M. F. Hasler, Feb 20 2020 (Start)
The index at which any n > 2 appears for the last time is given by A005096(n) = n! - n.
For m>2, a(n) > m for n > A005096(m).
The integer 1 appears only once as a(0), the integer 2 is the only positive integer which never appears. (End)
It would be nice to have an estimate for the growth of the upper envelope of this sequence - what is lim sup a(n)? The answer seems to be controlled by A333537. - N. J. A. Sloane, Apr 12 2020
Paul Zimmermann suggests that perhaps a(n) is O(log(n)^2). My estimate was n^(1/3), although that seems a bit low. - N. J. A. Sloane, Apr 09 2020

Crossrefs

Cf. A332584 for a "concatenation in base 10" variant.
See also A005096, A332558 (essentially identical to this one).
For records, see A333532 and A333533 (and A333537).

Programs

  • Mathematica
    f[n_] := (k = 1; While[ !IntegerQ[ k! / (k + n) ], k++ ]; k); Table[ f[n], {n, 0, 75} ]
  • PARI
    a(n) = my (f=1); for (k=1, oo, if ((f*=k)%(n+k)==0, return (k))) \\ Rémy Sigrist, Feb 17 2020

Extensions

"k>0" added to definition at the suggestion of Chai Wah Wu, Apr 09 2020. - N. J. A. Sloane, Apr 22 2020

A196411 n! - n^4.

Original entry on oeis.org

1, 0, -14, -75, -232, -505, -576, 2639, 36224, 356319, 3618800, 39902159, 478980864, 6226992239, 87178252784, 1307674317375, 20922789822464, 355687428012479, 6402373705623024, 121645100408701679, 2432902008176480000
Offset: 0

Views

Author

Vincenzo Librandi, Oct 06 2011

Keywords

Crossrefs

Programs

A108911 Difference between n and the sum of the factorials of its digits.

Original entry on oeis.org

0, 0, -3, -20, -115, -714, -5033, -40312, -362871, 8, 9, 9, 6, -11, -106, -705, -5024, -40303, -362862, 17, 18, 18, 15, -2, -97, -696, -5015, -40294, -362853, 23, 24, 24, 21, 4, -91, -690, -5009, -40288, -362847, 15, 16, 16, 13, -4, -99, -698, -5017, -40296, -362855, -71, -70, -70, -73
Offset: 1

Views

Author

Keywords

Comments

Null values are at n = 1, 2, 145, 40585 (A014080). Twin values are at n = 1, 2; 11, 12; 21, 22; ... 10*i + 1, 10*i + 2. Not in sequence: 7, 10, 14, ... Nice polar diagrams repeating themselves with normalized angle to 9! and radius = a(n).
The sequence can be seen as the difference between the natural numbers in the decimal system (n_dec = N0*(10^0) + N1*(10^1) + N2*(10^2)...) and their values in a non-positional number system based on the factorials of the digits (n_fact = N0*(N0 - 1)! + N1*(N1 - 1)! + N2*(N2 - 1)! ...). See also A111095. Note that a(np) - a(n) is congruent to 0 mod 9 if n and np are different for the permutation of the digits. Example (a(5971) - a(1957))/9 = 446. The property can be easily derived by remembering that np - n is congruent to 0 mod 9. - Giorgio Balzarotti, Oct 15 2005

Examples

			For n = 35, a(35) = -91 because 35 - (3! + 5!) = 35 - (6 + 120) = -91.
		

Crossrefs

Programs

  • Magma
    [n-&+[Factorial(d): d in Intseq(n)]: n in [1..60]]; // Bruno Berselli, Oct 25 2018
  • Maple
    a:= n-> n-add(i!, i=convert(n, base, 10)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 24 2018
  • Mathematica
    f[n_] := n - Plus @@ Factorial /@ IntegerDigits[n]; Table[f[n], {n, 53}] (* Ray Chandler, Jul 24 2005 *)
  • PARI
    a(n) = my(d = digits(n)); n - sum(i=1, #d, d[i]!); \\ Michel Marcus, Apr 21 2014
    

Formula

a(n) = n - (N0! + N1! + N2! + ...) if n = N0*10^0 + N1*10^1 + N2*10^2 ...
a(n) = n - A061602(n). - Michel Marcus, Apr 21 2014

Extensions

Extended by Ray Chandler, Jul 24 2005

A196412 a(n) = n! - n^5.

Original entry on oeis.org

1, 0, -30, -237, -1000, -3005, -7056, -11767, 7552, 303831, 3528800, 39755749, 478752768, 6226649507, 87177753376, 1307673608625, 20922788839424, 355687426676143, 6402373703838432, 121645100406355901, 2432902008173440000
Offset: 0

Views

Author

Vincenzo Librandi, Oct 06 2011

Keywords

Crossrefs

Programs

A196413 n! - n^6.

Original entry on oeis.org

1, 0, -62, -723, -4072, -15505, -45936, -112609, -221824, -168561, 2628800, 38145239, 476015616, 6222193991, 87170761664, 1307662977375, 20922773110784, 355687403958431, 6402373671715776, 121645100361786119, 2432902008112640000
Offset: 0

Views

Author

Vincenzo Librandi, Oct 06 2011

Keywords

Crossrefs

Programs

A111095 n = Sum_{b} c_b*b! in the factorial base rewritten by c_b-fold repetition of b, b=1,2,3,....

Original entry on oeis.org

1, 2, 12, 22, 122, 3, 13, 23, 123, 223, 1223, 33, 133, 233, 1233, 2233, 12233, 333, 1333, 2333, 12333, 22333, 122333, 4, 14, 24, 124, 224, 1224, 34, 134, 234, 1234, 2234, 12234, 334, 1334, 2334, 12334, 22334
Offset: 1

Views

Author

Keywords

Comments

The integer n has a unique "greedy" representation in the factorial base as n = Sum_{b>=1} c_b*b!, see A007623.
The number of coefficients c_b is A084558(n).
The current sequence starts from an empty string, scans the coefficients c_b in the order b=1,2,3,..., i.e., reads A007623(n) from the least to the most significant position, and appends b c_b times to the string. The resulting string is shown in the sequence as a standard decimal number a(n).

Examples

			a(39) = 12334 with A007623(39) = 1211, because 1! + 2! + 3! + 3! + 4! = 1 + 2 + 6 + 6 + 24 = 39
		

Crossrefs

Formula

A061602(a(n)) = n. - R. J. Mathar, Oct 30 2010

Extensions

Definition and comment shortened with reference to A007623 - R. J. Mathar, Oct 30 2010

A196414 n! - n^7.

Original entry on oeis.org

1, 0, -126, -2181, -16360, -78005, -279216, -818503, -2056832, -4420089, -6371200, 20429629, 443169792, 6164272283, 87072877696, 1307503508625, 20922521452544, 355687017757327, 6402373093507968, 121645099514960261, 2432902006896640000
Offset: 0

Views

Author

Vincenzo Librandi, Oct 06 2011

Keywords

Crossrefs

Programs

A294619 a(0) = 0, a(1) = 1, a(2) = 2 and a(n) = 1 for n > 2.

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Continued fraction expansion of (sqrt(5) + 1)/(2*sqrt(5)).
Inverse binomial transform is {0, 1, 4, 10, 21, 41, 78, 148, ...}, A132925 with one leading zero.
Also the main diagonal in the expansion of (1 + x)^n - 1 + x^2 (A300453).
The partial sum of this sequence is A184985.
a(n) is the number of state diagrams having n components that are obtained from an n-foil [(2,n)-torus knot] shadow. Let a shadow diagram be the regular projection of a mathematical knot into the plane, where the under/over information at every crossing is omitted. A state for the shadow diagram is a diagram obtained by merging either of the opposite areas surrounding each crossing.
a(n) satisfies the identities a(n)^a(n+k) = a(n), 2^a(k) = 2*a(k) and a(k)! = a(k), k > 0.
Also the number of non-isomorphic simple connected undirected graphs with n+1 edges and a longest path of length 2. - Nathaniel Gregg, Nov 02 2021

Examples

			For n = 2, the shadow of the Hopf link yields 2 two-component state diagrams (see example in A300453). Thus a(2) = 2.
		

References

  • V. I. Arnold, Topological Invariants of Plane Curves and Caustics, American Math. Soc., 1994.
  • L. H. Kauffman, Knots and Physics, World Scientific Publishers, 1991.
  • V. Manturov, Knot Theory, CRC Press, 2004.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x + x^2 - x^3)/(1 - x), {x, 0, 100}], x] (* Wesley Ivan Hurt, Nov 05 2017 *)
    f[n_] := If[n > 2, 1, n]; Array[f, 105, 0] (* Robert G. Wilson v, Dec 27 2017 *)
    PadRight[{0,1,2},120,{1}] (* Harvey P. Dale, Feb 20 2023 *)
  • Maxima
    makelist((1 + (-1)^((n + 1)!))/2 + kron_delta(n, 2), n, 0, 100);
  • PARI
    a(n) = if(n>2, 1, n);
    

Formula

a(n) = ((-1)^2^(n^2 + 3*n + 2) + (-1)^2^(n^2 - n) - (-1)^2^(n^2 - 3*n + 2) + 1)/2.
a(n) = (1 + (-1)^((n + 1)!))/2 + Kronecker(n, 2).
a(n) = min(n, 3) - 2*(max(n - 2, 0) - max(n - 3, 0)).
a(n) = floor(F(n+1)/F(n)) for n > 0, with a(0) = 0, where F(n) = A000045(n) is the n-th Fibonacci number.
a(n) = a(n-1) for n > 3, with a(0) = 0, a(1) = 1, a(2) = 2 and a(3) = 1.
A005803(a(n)) = A005096(a(n)) = A000007(n).
A107583(a(n)) = A103775(n+5).
a(n+1) = 2^A185012(n+1), with a(0) = 0.
a(n) = A163985(n) mod A004278(n+1).
a(n) = A157928(n) + A171386(n+1).
a(n) = A063524(n) + A157928(n) + A185012(n).
a(n) = A010701(n) - A141044(n) - A179184(n).
G.f.: (x + x^2 - x^3)/(1 - x).
E.g.f.: (2*exp(x) - 2 + x^2)/2.

A196738 n! - n^8.

Original entry on oeis.org

1, 0, -254, -6555, -65512, -390505, -1678896, -5759761, -16736896, -42683841, -96371200, -174442081, 49019904, 5411290079, 85702502144, 1305111477375, 20918494920704, 355680452338559, 6402362685767424, 121645083425268959, 2432901982576640000
Offset: 0

Views

Author

Vincenzo Librandi, Oct 06 2011

Keywords

Crossrefs

Programs

A227546 a(n) = n! + n^2 + 1.

Original entry on oeis.org

2, 3, 7, 16, 41, 146, 757, 5090, 40385, 362962, 3628901, 39916922, 479001745, 6227020970, 87178291397, 1307674368226, 20922789888257, 355687428096290, 6402373705728325, 121645100408832362, 2432902008176640401, 51090942171709440442, 1124000727777607680485
Offset: 0

Views

Author

Vincenzo Librandi, Jul 26 2013

Keywords

Crossrefs

Cf. A119662 (primes of the form k! + k^2 + 1).

Programs

  • Magma
    [Factorial(n)+n^2+1: n in [0..25]];
    
  • Mathematica
    Table[n! + n^2 + 1, {n, 0, 30}]
  • Maxima
    /* By the recurrence: */ a[0]:2$ a[1]:3$ a[n]:=(n^4-5*n^3+8*n^2-5*n-1)*a[n-1]/(n^3-6*n^2+11*n -7)-(n-1)*(n^3-3*n^2+2*n-1)*a[n-2]/(n^3-6*n^2+11*n-7)$ makelist(a[n], n, 0, 21); /* Bruno Berselli, Jul 26 2013 */

Formula

(n^3 -6*n^2 +11*n -7)*a(n) -(n^4 -5*n^3 +8*n^2 -5*n -1)*a(n-1) +(n-1)*(n^3 -3*n^2 +2*n -1)*a(n-2) = 0 for n>1. - Bruno Berselli, Jul 26 2013
Showing 1-10 of 15 results. Next