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 31-40 of 96 results. Next

A139173 a(n) = n!/3 - 1.

Original entry on oeis.org

1, 7, 39, 239, 1679, 13439, 120959, 1209599, 13305599, 159667199, 2075673599, 29059430399, 435891455999, 6974263295999, 118562476031999, 2134124568575999, 40548366802943999, 810967336058879999
Offset: 3

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Original definition: Natural numbers of the form (n! - 3)/3.

Crossrefs

Cf. A139191: primes in this sequence. - M. F. Hasler, Apr 09 2009

Programs

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

Formula

E.g.f.: (6 - 3*x^2 - x^3)/(6*(1-x)) - exp(x). - G. C. Greubel, Oct 18 2018

Extensions

Edited by M. F. Hasler, Apr 09 2009

A257079 The least nonzero digit missing from the factorial representation (A007623) of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Examples

			The least digit > 0 missing from the factorial representation (A007623) of zero, "0", is 1, thus a(0) = 1.
The least digit > 0 missing from the factorial representation of one, "1", is 2, thus a(1) = 2.
The least digit > 0 missing from the factorial representation of 21, "311", is 2, thus a(21) = 2.
		

Crossrefs

Cf. A033312 (the positions of records from a(1) onward.)
Cf. A255411 (the positions of ones.)

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++]; Min[Complement[Range[Max[s]+1], s]]]; a[0] = 1; Array[a, 100, 0] (* Amiram Eldar, Jan 24 2024 *)
  • Scheme
    (define (A257079 n) (let loop ((digs (uniq (sort (n->factbase n) <))) (mnp 1)) (cond ((null? digs) mnp) ((zero? (car digs)) (loop (cdr digs) mnp)) ((= (car digs) mnp) (loop (cdr digs) (+ 1 mnp))) (else mnp))))
    ;; Convert an integer to a factorial expansion list:
    (define (n->factbase n) (let loop ((n n) (fex (if (zero? n) (list 0) (list))) (i 2)) (cond ((zero? n) fex) (else (loop (floor->exact (/ n i)) (cons (modulo n i) fex) (1+ i))))))
    (define (uniq lista) (let loop ((lista lista) (z (list))) (cond ((null? lista) (reverse! z)) ((and (pair? z) (equal? (car z) (car lista))) (loop (cdr lista) z)) (else (loop (cdr lista) (cons (car lista) z))))))

Formula

Other identities:
For all n >= 1, a(A033312(n)) = n. [n! - 1 gives the first position where n appears. Note also how the digits in factorial base representation may get arbitrarily large values.]

A020543 a(0) = 1, a(1) = 1, a(n+1) = (n+1)*a(n) + n.

Original entry on oeis.org

1, 1, 3, 11, 47, 239, 1439, 10079, 80639, 725759, 7257599, 79833599, 958003199, 12454041599, 174356582399, 2615348735999, 41845579775999, 711374856191999, 12804747411455999, 243290200817663999, 4865804016353279999
Offset: 0

Views

Author

Keywords

Comments

First Bernoulli polynomial evaluated at x=n! and multiplied by 2.
From Jaroslav Krizek, Jan 23 2010: (Start)
a(0) = 1, for n >= 1: a(n) = numbers m for which there is one iteration {floor(r/k)} for k = n, n-1, n-2, ... 1 with property r mod k = k-1 starting at r = m.
For n = 5: a(5) = 239;
floor(239/5) = 47, 239 mod 5 = 4;
floor( 47/4) = 11, 47 mod 4 = 3;
floor( 11/3) = 3, 11 mod 3 = 2;
floor( 3/2) = 1, 3 mod 2 = 1;
floor( 1/1) = 1, 1 mod 1 = 0. (End)
With offset 1, is the eigensequence of a triangle with the natural numbers (1, 2, 3, ...) as the right border, (1, 1, 2, 3, 4, ...) as the left border; and the rest zeros. - Gary W. Adamson, Aug 01 2016

Crossrefs

Cf. A052898(n) - 2.
Cf. sequences of the type k*n!-1: A033312 (k=1), this sequence, A173323 (k=3), A173321 (k=4), A173317 (k=5), A173316 (k=6).

Programs

Formula

E.g.f.: (-2 + exp(x) - x*exp(x))/(1-x). - Ralf Stephan, Feb 18 2004
a(n) = 2*n! - 1. - Gary W. Adamson, Jan 07 2008
a(0) = a(1) = 1, a(n) = a(n-1) * n + (n-1) for n >= 2. - Jaroslav Krizek, Jan 23 2010
a(n) ~ 2*sqrt(2*Pi*n)*n^n/exp(n). - Ilya Gutkovskiy, Aug 02 2016

Extensions

Better description from Benoit Cloitre, Dec 29 2001

A231716 Numbers with restricted residue set factorial base representation: numbers n which can be formed as a sum n = du*u! + ... + d2*2! + d1*1!, where each di is in range 1..i and gcd(di,i+1)=1.

Original entry on oeis.org

1, 3, 5, 9, 11, 21, 23, 33, 35, 45, 47, 57, 59, 69, 71, 81, 83, 93, 95, 105, 107, 117, 119, 153, 155, 165, 167, 177, 179, 189, 191, 201, 203, 213, 215, 225, 227, 237, 239, 633, 635, 645, 647, 657, 659, 669, 671, 681, 683, 693, 695, 705, 707, 717, 719, 873, 875
Offset: 1

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

A001088(n+1) gives the number of terms x in sequence for which A084558(x)=n.
Because totatives (the reduced residue set) of each natural number k form a multiplicative group of integers modulo same k, it means that taking e.g. inverses of each digit modulo same k or multiplying them (again modulo k) by some member of that set keeps the set closed, and thus applying these operations to each digit modulo i+1 (2 for the least significant digit in factorial base, 3 for the next, and so on) yield only digits allowed in this sequence, and thus they induce various permutations of this sequence. These can be further "normalized" to be permutations of natural numbers with a suitable ranking function, which is to be submitted later.

Examples

			This can be viewed as an irregular table, where row n has A001088(n+1) elements, starts from position A231721(n) and ends at position A231722(n+1):
1;
3, 5;
9, 11, 21, 23;
33, 35, 45, 47, 57, 59, 69, 71, 81, 83, 93, 95, 105, 107, 117, 119;
...
		

Crossrefs

Positions of ones in A231715.
The first term of each row: A007489(n) = a(A231721(n)).
The last term of each row: A033312(n+1) = a(A231722(n+1)).
Subset of A227157.

A173321 a(n) = 4*n! - 1.

Original entry on oeis.org

3, 3, 7, 23, 95, 479, 2879, 20159, 161279, 1451519, 14515199, 159667199, 1916006399, 24908083199, 348713164799, 5230697471999, 83691159551999, 1422749712383999, 25609494822911999, 486580401635327999
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Comments

From Bernard Schott, Jul 11 2019: (Start)
With this sequence, it is possible to prove that there are infinitely many prime numbers of the form 4*k+3.
Prove that:
1. Every prime factor of a(n) is > n, and,
2. All these prime factors are of the form 4*k+1 or 4*k+3.
3. There is at least one prime of the form 4*k+3 > n,
4. The set of prime numbers of the form 4*k+3 is infinite.
(End)
The smallest prime of the form 4*k + 3 that divides a(n) is A333924(n). - Bernard Schott, Oct 08 2021

References

  • Transmath, Term S, Spécialité, Programme 2002, Nathan, 2002, Exercice 82 p. 93.

Crossrefs

Cf. sequences of the type k*n!-1: A033312 (k=1), A020543 (k=2), A173323 (k=3), this sequence, A173317 (k=5), A173316 (k=6).
Cf. A002145 (primes of the form 4*k+3), A333924.

Programs

Formula

a(n) = n*a(n-1) + n - 1 for n > 0, a(0) = 3. - Vincenzo Librandi, Sep 30 2013

A257694 a(0) = 1; for n >= 1, a(n) = A060130(n) * a(A257684(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 4, 6, 1, 2, 2, 3, 4, 6, 1, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 6, 8, 2, 3, 3, 4, 6, 8, 1, 2, 2, 3, 4, 6, 2, 3, 3, 4, 6, 8, 4, 6, 6, 8, 9, 12, 4, 6, 6, 8, 9, 12, 1, 2, 2, 3, 4, 6, 2, 3, 3, 4, 6, 8, 4, 6, 6, 8, 9, 12, 8, 12, 12, 16, 18, 24, 1, 2, 2, 3, 4, 6, 2, 3, 3, 4, 6, 8, 4, 6, 6, 8, 9, 12, 8, 12, 12, 16, 18, 24, 1
Offset: 0

Views

Author

Antti Karttunen, May 05 2015

Keywords

Crossrefs

Formula

a(0) = 1; for n >= 1, a(n) = A060130(n) * a(A257684(n)).
Other identities:
For all n >= 1, a(A033312(n)) = A000142(n-1).

A369245 Number of representations of the n-th Euclid number, A002110(n) + 1, as a sum (p*q + p*r + q*r) with three odd primes p <= q <= r. (Definition implies that p=3 and q > 3).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 22 2024

Keywords

Comments

Number of representations of the n-th Euclid number, A002110(n) + 1, as a sum of the form 3*(p+q) + p*q, where p and q are odd primes.
Question: Will there be an eventual growth spurt for this sequence? Even though all solutions must be multiples of 3 (but not of 9), because A006862(n) == 1 (mod 3), for n > 1, and the solutions belong to a set listed by A369461.
Similar sequence A369242 grows more vigorously because A033312(n) == -1 (mod 3) for n >= 3, thus allowing non-multiples of 3 as solutions. See comments in A369252.

Examples

			a(4) = 1 as there exists a natural number 399 = 3 * 7 * 19, whose arithmetic derivative (indicated with 399', see A003415) is computed as ((3*7) + (3*19) + (7*19)) = 211 = 1 + prime(4)# = A006862(4), and because 399 is the unique term in A046316 that satisfies the condition.
a(17) >= 1 because there exists (at least one) solution k = 4903038892893242229501 = 3 * 17 * 96138017507710631951 with A003415(k) = 1+A002110(17).
For other cases, see examples in A369246.
		

Crossrefs

Cf. also A116979, A369000, A369239 for similar counts, also A369241, A369242 and A369247.

Programs

  • PARI
    \\ Needs also program from A369054.
    A002110(n) = prod(i=1,n,prime(i));
    A369245(n) = A369054(A002110(n)+1);
    
  • PARI
    \\ Optimized version of above, employs the fact that solutions must all be multiples of 3. Outputs also terms for A369246.
    search_for_3k1_cases(n) = if(3!=(n%4),0, my(p = 5, q, c=0); while(1, q = (n-(3*p)) / (3+p); if(q < p, return(c), if(1==denominator(q) && isprime(q),c++; write("b369246_by_search_order_to.txt", n, " ", 3*p*q))); p = nextprime(1+p)));
    A002110(n) = prod(i=1,n,prime(i));
    A369245(n) = search_for_3k1_cases(A002110(n)+1);

Formula

a(n) = A369054(A006862(n)).

A054415 Smallest prime factor of n!-1 (for n>2), a(2)=1.

Original entry on oeis.org

1, 5, 23, 7, 719, 5039, 23, 11, 29, 13, 479001599, 1733, 87178291199, 17, 3041, 19, 59, 653, 124769, 23, 109, 51871, 625793187653, 149, 20431, 29, 239, 31, 265252859812191058636308479999999, 787, 263130836933693530167218012159999999, 8683317618811886495518194401279999999
Offset: 2

Views

Author

Henry Bottomley, May 10 2000

Keywords

Comments

The initial term a(2)=1 is not a prime, but it does not affect search results and may prevent submission of duplicates. - M. F. Hasler, Oct 31 2012

Examples

			a(3)=5 because 3!-1=5 which is prime; a(5)=7 because 5!-1=119=7*17 and 7<17
		

Crossrefs

Programs

  • Mathematica
    Do[ Print[ FactorInteger[ n! - 1, FactorComplete -> True][ [1, 1] ] ], {n, 3, 32} ]
  • PARI
    A054415(n)=if(n>2,factor(n!-1)[1,1],1)  \\ M. F. Hasler, Oct 31 2012

Formula

Erdős & Stewart show that a(n) > n + (l-o(l))log n/log log n except when n+1 is prime, and that a(n) > n + e(n)sqrt(n) for almost all n where e(n) is any function with lim e(n) = 0. - Charles R Greathouse IV, Dec 05 2012

Extensions

More terms from Robert G. Wilson v, Aug 01 2000
More terms from Amiram Eldar, Oct 07 2019

A173316 a(n) = 6*n! - 1.

Original entry on oeis.org

5, 5, 11, 35, 143, 719, 4319, 30239, 241919, 2177279, 21772799, 239500799, 2874009599, 37362124799, 523069747199, 7846046207999, 125536739327999, 2134124568575999, 38414242234367999, 729870602452991999, 14597412049059839999, 306545653030256639999
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Crossrefs

Cf. sequences of the type k*n!-1: A033312 (k=1), A020543 (k=2), A173323 (k=3), A173321 (k=4), A173317 (k=5).

Programs

  • Magma
    [6*Factorial(n)-1: n in [0..25]]; // Vincenzo Librandi, Sep 30 2013
    
  • Magma
    [5] cat [n eq 1 select n+4 else n*Self(n-1)+n-1: n in [1..25] ]; // Vincenzo Librandi, Sep 30 2013
  • Mathematica
    Table[6 n! - 1, {n, 0, 25}] (* Vincenzo Librandi, Sep 30 2013 *)

Formula

a(0)=5, a(n) = n*a(n-1)+n-1. - Vincenzo Librandi, Sep 30 2013

A173317 a(n) = 5*n! - 1.

Original entry on oeis.org

4, 4, 9, 29, 119, 599, 3599, 25199, 201599, 1814399, 18143999, 199583999, 2395007999, 31135103999, 435891455999, 6538371839999, 104613949439999, 1778437140479999, 32011868528639999, 608225502044159999
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Crossrefs

Cf. sequences of the type k*n!-1: A033312 (k=1), A020543 (k=2), A173323 (k=3), A173321 (k=4), this sequence, A173316 (k=6).

Programs

  • Magma
    [5*Factorial(n)-1: n in [0..25]]; // Vincenzo Librandi, Sep 30 2013
    
  • Magma
    [4] cat [n eq 1 select n+3 else n*Self(n-1)+n-1: n in [1..25] ]; // Vincenzo Librandi, Sep 30 2013
  • Mathematica
    Table[5 n! - 1, {n, 0, 25}] (* Vincenzo Librandi, Sep 30 2013 *)

Formula

a(n) = 5*A000142(n)-1.
a(0)=4, a(n) = n*a(n-1)+n-1. - Vincenzo Librandi, Sep 30 2013

Extensions

a(16) corrected from Vincenzo Librandi, Sep 30 2013
Previous Showing 31-40 of 96 results. Next