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 41-50 of 141 results. Next

A062481 a(n) = n^prime(n).

Original entry on oeis.org

1, 8, 243, 16384, 48828125, 13060694016, 232630513987207, 144115188075855872, 8862938119652501095929, 100000000000000000000000000000, 191943424957750480504146841291811, 8505622499821102144576131684114829934592, 4695452425098908797088971409337422035076128813
Offset: 1

Views

Author

Labos Elemer, Jul 09 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n^Prime[n],{n,20}] (* Harvey P. Dale, Jun 12 2014 *)
  • PARI
    a(n)={n^prime(n)} \\ Harry J. Smith, Aug 08 2009
    
  • Python
    from sympy import prime
    def a(n): return n**prime(n)
    print([a(n) for n in range(1, 14)]) # Michael S. Branicky, Jun 15 2022

Formula

From Amiram Eldar, Nov 18 2020: (Start)
a(n) = n^A000040(n).
Sum_{n>=1} 1/a(n) = A096250. (End)
a(n) == n (mod prime(n)). [Fermat's little theorem] - Nicolas Bělohoubek, Jun 14 2022

Extensions

More terms from Harvey P. Dale, Jun 12 2014

A083737 Pseudoprimes to bases 2, 3 and 5.

Original entry on oeis.org

1729, 2821, 6601, 8911, 15841, 29341, 41041, 46657, 52633, 63973, 75361, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 294409, 314821, 334153, 340561, 399001, 410041, 488881, 512461, 530881, 552721, 658801, 670033, 721801, 748657
Offset: 1

Views

Author

Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), May 05 2003

Keywords

Comments

a(n) = n-th positive integer k(>1) such that 2^(k-1) == 1 (mod k), 3^(k-1) == 1 (mod k) and 5^(k-1) == 1 (mod k)
See A153580 for numbers k > 1 such that 2^k-2, 3^k-3 and 5^k-5 are all divisible by k but k is not a Carmichael number (A002997).
Note that a(1)=1729 is the Hardy-Ramanujan number. - Omar E. Pol, Jan 18 2009

Examples

			a(1)=1729 since it is the first number such that 2^(k-1) == 1 (mod k), 3^(k-1) == 1 (mod k) and 5^(k-1) == 1 (mod k).
		

Crossrefs

Proper subset of A052155. Superset of A230722. Cf. A153580, A002997, A001235, A011541.

Programs

  • Mathematica
    Select[ Range[838200], !PrimeQ[ # ] && PowerMod[2, # - 1, # ] == 1 && PowerMod[3, 1 - 1, # ] == 1 && PowerMod[5, # - 1, # ] == 1 & ]
  • PARI
    is(n)=!isprime(n)&&Mod(2,n)^(n-1)==1&&Mod(3,n)^(n-1)==1&&Mod(5,n)^(n-1)==1 \\ Charles R Greathouse IV, Apr 12 2012

Extensions

Edited by Robert G. Wilson v, May 06 2003
Edited by N. J. A. Sloane, Jan 14 2009

A087265 Lucas numbers L(8*n).

Original entry on oeis.org

2, 47, 2207, 103682, 4870847, 228826127, 10749957122, 505019158607, 23725150497407, 1114577054219522, 52361396397820127, 2459871053643326447, 115561578124838522882, 5428934300813767249007, 255044350560122222180447
Offset: 0

Views

Author

Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Oct 19 2003

Keywords

Comments

a(n+1)/a(n) converges to (47+sqrt(2205))/2 = 46.9787137... a(0)/a(1)=2/47; a(1)/a(2)=47/2207; a(2)/a(3)=2207/103682; a(3)/a(4)=103682/4870847; etc. Lim_{n->infinity} a(n)/a(n+1) = 0.02128623625... = 2/(47+sqrt(2205)) = (47-sqrt(2205))/2.
a(n) = a(-n). - Alois P. Heinz, Aug 07 2008
From Peter Bala, Oct 14 2019: (Start)
Let F(x) = Product_{n >= 0} (1 + x^(4*n+1))/(1 + x^(4*n+3)). Let Phi = 1/2*(sqrt(5) - 1). This sequence gives the partial denominators in the simple continued fraction expansion of the number F(Phi^8) = 1.0212763906... = 1 + 1/(47 + 1/(2207 + 1/(103682 + ...))).
Also F(-Phi^8) = 0.9787231991... has the continued fraction representation 1 - 1/(47 - 1/(2207 - 1/(103682 - ...))) and the simple continued fraction expansion 1/(1 + 1/((47 - 2) + 1/(1 + 1/((2207 - 2) + 1/(1 + 1/((103682 - 2) + 1/(1 + ...))))))).
F(Phi^8)*F(-Phi^8) = 0.9995468962... has the simple continued fraction expansion 1/(1 + 1/((47^2 - 4) + 1/(1 + 1/((2207^2 - 4) + 1/(1 + 1/((103682^2 - 4) + 1/(1 + ...))))))).
1/2 + 1/2*F(Phi^8)/F(-Phi^8) = 1.0217391349... has the simple continued fraction expansion 1 + 1/((47 - 2) + 1/(1 + 1/((103682 - 2) + 1/(1 + 1/(228826127 - 2) + 1/(1 + ...))))). (End)

Examples

			a(4) = 4870847 = 47*a(3) - a(2) = 47*103682 - 2207=((47+sqrt(2205))/2)^4 + ( (47-sqrt(2205))/2)^4 =4870846.999999794696 + 0.000000205303 = 4870847.
		

References

  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 91.
  • R. P. Stanley. Enumerative combinatorics. Vol. 2, volume 62 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.

Crossrefs

Cf. A000032. Cf. Lucas(k*n): A005248 (k = 2), A014448 (k = 3), A056854 (k = 4), A001946 (k = 5), A087215 (k = 6), A087281 (k = 7), A087287 (k = 9), A065705 (k = 10), A089772 (k = 11), A089775 (k = 12).
a(n) = A000032(8n).

Programs

  • Magma
    [ Lucas(8*n) : n in [0..100]]; // Vincenzo Librandi, Apr 14 2011
  • Maple
    a:= n-> (Matrix([[2,47]]). Matrix([[47,1],[ -1,0]])^(n))[1,1]:
    seq(a(n), n=0..14);  # Alois P. Heinz, Aug 07 2008
  • Mathematica
    LucasL[8*Range[0,20]] (* or *) LinearRecurrence[{47,-1},{2,47},20] (* Harvey P. Dale, Oct 23 2017 *)

Formula

a(n) = 47*a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 47.
a(n) = ((47+sqrt(2205))/2)^n + ((47-sqrt(2205))/2)^n
(a(n))^2 = a(2n)+2.
G.f.: (2-47*x)/(1-47*x+x^2). - Alois P. Heinz, Aug 07 2008
From Peter Bala, Oct 14 2019: (Start)
a(n) = F(8*n+8)/F(8) - F(8*n-8)/F(8) = A049668(n+1) - A049668(n-1).
a(n) = trace(M^n), where M is the 2 X 2 matrix [0, 1; 1, 1]^8 = [13, 21; 21, 34].
Consequently the Gauss congruences hold: a(n*p^k) = a(n*p^(k-1)) ( mod p^k ) for all prime p and positive integers n and k. See Zarelua and also Stanley (Ch. 5, Ex. 5.2(a) and its solution).
45*Sum_{n >= 1} 1/(a(n) - 49/a(n)) = 1: (49 = Lucas(8) + 2 and 45 = Lucas(8) - 2)
49*Sum_{n >= 1} (-1)^(n+1)/(a(n) + 45/a(n)) = 1.
x*exp(Sum_{n >= 1} a(n)*x^/n) = x + 47*x^2 + 2208*x^3 + ... is the o.g.f. for A049668. (End)
E.g.f.: 2*exp(47*x/2)*cosh(21*sqrt(5)*x/2). - Stefano Spezia, Oct 18 2019
From Peter Bala, Apr 16 2025: (Start)
a(n) = Lucas(2*n)^4 - 4*Lucas(2*n)^2 + 2 = 2*T(4, (1/2)*Lucas(2*n)), where T(k, x) denotes the k-th Chebyshev polynomial of the first kind; more generally, for k >= 0, Lucas(2*k*n) = 2*T(k, Lucas(2*n)/2).
Sum_{n >= 1} 1/a(n) = (1/4) * (theta_3( (47 - sqrt(2205))/2 )^2 - 1) and
Sum_{n >= 1} (-1)^(n+1)/a(n) = (1/4) * (1 - theta_3( (sqrt(2205) - 47)/2 )^2),
where theta_3(x) = 1 + 2*Sum_{n >= 1} x^(n^2) (see A000122). See Borwein and Borwein, Proposition 3.5 (i), p. 91. Cf. A153415 and A003499. (End)

Extensions

Terms a(22)-a(27) from John W. Layman, Jun 14 2004

A170915 Write 1 + sin x = Product_{n>=1} (1 + g_n * x^n); a(n) = denominator(g_n).

Original entry on oeis.org

1, 1, 6, 6, 120, 120, 5040, 280, 72576, 362880, 39916800, 11975040, 1245404160, 88957440, 1307674368000, 11675664000, 71137485619200, 1067062284288000, 121645100408832000, 101370917007360000, 10218188434341888000, 5109094217170944000, 25852016738884976640000
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2010

Keywords

Comments

From Petros Hadjicostas, Oct 06 2019: (Start)
The recurrence about (A(m,n): m,n >= 1) in the Formula section follows from Theorem 3 in Gingold et al. (1988); see also Gingold and Knopfmacher (1995, p. 1222). A(m=1,n) equals the n-th coefficient of the Taylor expansion of 1 + sin(x).
If 1 + sin(x) = 1/Product_{n>=1} (1 + f_n * x^n) (inverse power product expansion), then Gingold and Knopfmacher (1995) and Alkauskas (2008, 2009) proved that f_n = -g_n for n odd, and Sum_{s|n} (-g_{n/s})^s/s = -Sum_{s|n} (-f_{n/s})^s/s. [We caution that different authors may use -g_n for g_n, or -f_n for f_n, or both.] We have A328191(n) = numerator(f_n) and A328186(n) = denominator(f_n).
Wolfdieter Lang (see the link below) examined inverse power product expansions both for ordinary g.f.'s and for exponential g.f.'s.
In all cases, we assume the g.f.'s are unital, i.e., the g.f.'s start with a constant 1.
(End)

Examples

			g_n = 1, 0, -1/6, 1/6, -19/120, 19/120, -659/5040, 37/280, -7675/72576, ...
		

Crossrefs

Numerators are in A170914.

Programs

  • Maple
    # Calculates the fractions g_n (choose L much larger than M):
    PPE_sin := proc(L, M)
    local t1, t0, g, t2, n, t3;
    if L < 2.5*M then print("Choose larger value for L");
    else
    t1 := 1 + sin(x);
    t0 := series(t1, x, L);
    g := []; t2 := t0;
    for n to M do
    t3 := coeff(t2, x, n);
    t2 := series(t2/(1 + t3*x^n), x, L);
    g := [op(g), t3];
    end do;
    end if;
    [seq(g[n], n = 1 .. nops(g))];
    end proc;
    # Calculates the denominators of g_n:
    h1 := map(denom, PPE_sin(100, 40)); # Petros Hadjicostas, Oct 06 2019 by modifying N. J. A. Sloane's program from A170912 and A170913.
  • Mathematica
    A[m_, n_] :=
      A[m, n] =
       Which[m == 1, (1-(-1)^n)*(-1)^Floor[(n-1)/2]/(2*n!), m > n >= 1, 0, True,
        A[m - 1, n] - A[m - 1, m - 1]*A[m, n - m + 1]];
    a[n_] := Denominator[A[n, n]];
    a /@ Range[1, 55] (* Petros Hadjicostas, Oct 06 2019, courtesy of Jean-François Alcover *)

Formula

From Petros Hadjicostas, Oct 07 2019: (Start)
a(2*n+1) = A328186(2*n+1) for n >= 0.
Define (A(m,n): n,m >= 1) by A(m=1,2*n+1) = (-1)^n/(2*n+1)! for n >= 0, A(m=1,2*n) = 0 for n >= 1, A(m,n) = 0 for m > n >= 1 (upper triangular), and A(m,n) = A(m-1,n) - A(m-1,m-1) * A(m,n-m+1) for n >= m >= 2. Then g_n = A(n,n). (End)

A174275 a(n) = 2^(n-1) mod M(n) where M(n) = A014963(n) is the exponential of the Mangoldt function.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Mar 14 2010

Keywords

Comments

Appears to be always either 0 or 1.
This follows from Fermat's Little Theorem. - Charles R Greathouse IV, Feb 13 2011
Characteristic function for odd prime powers (larger than one). - Antti Karttunen, Sep 14 2017, after Charles R Greathouse IV's Feb 13 2011 formula.

Crossrefs

Cf. A062173.

Programs

Formula

a(n) = A000079(n-1) mod A014963(n).
a(n) = 1 if n = p^k for k > 0 and p a prime not equal to 2, a(n) = 0 otherwise. - Charles R Greathouse IV, Feb 13 2011

Extensions

More terms from Antti Karttunen, Sep 14 2017
Name corrected by Steven Foster Clark, Sep 05 2023

A170914 Write 1 + sin x = Product_{n>=1} (1 + g_n * x^n); a(n) = numerator(g_n).

Original entry on oeis.org

1, 0, -1, 1, -19, 19, -659, 37, -7675, 40043, -3578279, 1123009, -95259767, 7091713, -85215100151, 832857559, -4180679675171, 63804880881241, -6399968826052559, 5697831990097981, -478887035449041839, 252737248941887573, -1123931378903214542099, 35703551772944759
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2010

Keywords

Comments

From Petros Hadjicostas, Oct 06 2019: (Start)
The recurrence about (A(m,n): m,n >= 1) in the Formula section follows from Theorem 3 in Gingold et al. (1988); see also Gingold and Knopfmacher (1995, p. 1222). A(m=1,n) equals the n-th coefficient of the Taylor expansion of 1 + sin(x).
If 1 + sin(x) = 1/Product_{n>=1} (1 + f_n * x^n) (inverse power product expansion), then Gingold and Knopfmacher (1995) and Alkauskas (2008, 2009) proved that f_n = -g_n for n odd, and Sum_{s|n} (-g_{n/s})^s/s = -Sum_{s|n} (-f_{n/s})^s/s. [We caution that different authors may use -g_n for g_n, or -f_n for f_n, or both.] We have A328191(n) = numerator(f_n) and A328186(n) = denominator(f_n).
Wolfdieter Lang (see the link below) examined inverse power product expansions both for ordinary g.f.'s and for exponential g.f.'s.
In all cases, we assume the g.f.'s are unital, i.e., the g.f.'s start with a constant 1.
(End)

Examples

			g_n = 1, 0, -1/6, 1/6, -19/120, 19/120, -659/5040, 37/280, -7675/72576, ...
		

Crossrefs

Cf. Denominators are in A170915.

Programs

  • Maple
    # Calculates the fractions g_n (choose L much larger than M):
    PPE_sin := proc(L, M)
    local t1, t0, g, t2, n, t3;
    if L < 2.5*M then print("Choose larger value for L");
    else
    t1 := 1 + sin(x);
    t0 := series(t1, x, L);
    g := []; t2 := t0;
    for n to M do
    t3 := coeff(t2, x, n);
    t2 := series(t2/(1 + t3*x^n), x, L);
    g := [op(g), t3];
    end do;
    end if;
    [seq(g[n], n = 1 .. nops(g))];
    end proc;
    # Calculates the numerators of g_n:
    h1 := map(numer, PPE_sin(100, 40)); # Petros Hadjicostas, Oct 06 2019 by modifying N. J. A. Sloane's program from A170912 and A170913.
  • Mathematica
    A[m_, n_] :=
      A[m, n] =
       Which[m == 1, (1-(-1)^n)*(-1)^Floor[(n-1)/2]/(2*n!), m > n >= 1, 0, True,
        A[m - 1, n] - A[m - 1, m - 1]*A[m, n - m + 1]];
    a[n_] := Numerator[A[n, n]];
    a /@ Range[1, 55] (* Petros Hadjicostas, Oct 06 2019, courtesy of Jean-François Alcover *)

Formula

From Petros Hadjicostas, Oct 07 2019: (Start)
a(2*n+1) = -A328191(2*n+1) for n >= 0.
Define (A(m,n): n,m >= 1) by A(m=1,2*n+1) = (-1)^n/(2*n+1)! for n >= 0, A(m=1,2*n) = 0 for n >= 1, A(m,n) = 0 for m > n >= 1 (upper triangular), and A(m,n) = A(m-1,n) - A(m-1,m-1) * A(m,n-m+1) for n >= m >= 2. Then g_n = A(n,n). (End)

A204187 a(n) = Sum_{m=1..n-1} m^(n-1) modulo n.

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 6, 0, 6, 5, 10, 0, 12, 7, 10, 0, 16, 9, 18, 0, 14, 11, 22, 0, 20, 13, 18, 0, 28, 15, 30, 0, 22, 17, 0, 0, 36, 19, 26, 0, 40, 21, 42, 0, 21, 23, 46, 0, 42, 25, 34, 0, 52, 27, 0, 0, 38, 29, 58, 0, 60, 31, 42, 0, 52, 33, 66, 0, 46, 35, 70, 0
Offset: 1

Views

Author

Jonathan Sondow, Jan 12 2012

Keywords

Comments

a(n) = n - 1 if n is 1 or a prime, by Fermat's little theorem. It is conjectured that the converse is also true; see A055032 and A201560 and note that a(n) = n-1 <==> A055032(n) = 1 <==> A201560(n) = 0.
As of 1991, Giuga and Bedocchi had verified no composite n < 10^1700 satisfies a(n) = n - 1 (Ribemboim, 1991). - Alonso del Arte, May 10 2013

Examples

			Sum(m^3, m = 1 .. 3) = 1^3 + 2^3 + 3^3 = 36 == 0 (mod 4), so a(4) = 0.
		

References

  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 6 of Hong Kong Mathematical Olympiad 2007 (find a(7)), page 134.
  • Richard K. Guy, Unsolved Problems in Number Theory, A17.
  • Paulo Ribemboim, The Little Book of Big Primes. New York: Springer-Verlag (1991): 17.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[i^(n - 1), {i, n - 1}], n], {n, 75}] (* Alonso del Arte, May 10 2013 *)
  • PARI
    a(n) = lift(sum(i=1, n, Mod(i, n)^(n-1))); \\ Michel Marcus, Feb 23 2020
    
  • Python
    def a(n): return sum(pow(m, n-1, n) for m in range(1, n))%n
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Jan 02 2022

Formula

a(p) = p - 1 if p is prime, and a(4n) = 0.
a(n) + 1 == A201560(n) (mod n).
a(n) = n/2 iff n is of the form 4k+2 (conjectured). - Ivan Neretin, Sep 23 2016
a(4*k+2) = 2*k+1; for a proof see corresponding link. - Bernard Schott, Dec 29 2021

A208536 Number of 5-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.

Original entry on oeis.org

0, 0, 6, 48, 204, 624, 1554, 3360, 6552, 11808, 19998, 32208, 49764, 74256, 107562, 151872, 209712, 283968, 377910, 495216, 639996, 816816, 1030722, 1287264, 1592520, 1953120, 2376270, 2869776, 3442068, 4102224, 4859994, 5725824, 6710880
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2012

Keywords

Comments

This sequence would be better defined as a(n) = (n^5-n)/5 with offset 0, which is an integer by Fermat's little theorem. - N. J. A. Sloane, Nov 13 2023

Examples

			All solutions for n=3:
..1....1....1....1....1....1
..3....3....2....2....2....2
..1....2....1....3....3....1
..3....3....3....2....1....2
..2....2....2....3....3....3
		

Crossrefs

Row 5 of A208535.
Also, row 5 (with different offset) of A074650. - Eric M. Schmidt, Dec 08 2017
Cf. A208537.

Programs

Formula

Empirical: a(n) = (1/5)*n^5 - 1*n^4 + 2*n^3 - 2*n^2 + (4/5)*n.
Equivalently: a(n) = ((n-1)^5 - (n-1))/5. - M. F. Hasler, Mar 05 2016
Empirical formula confirmed by Petros Hadjicostas, Nov 05 2017 (see A208535).
a(n+2) = delta(-n) = -delta(n) for n >= 0, where delta is the p-derivation over the integers with respect to prime p = 5. - Danny Rorabaugh, Nov 10 2017
From Colin Barker, Nov 11 2017: (Start)
G.f.: 6*x^3*(1 + x)^2 / (1 - x)^6.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>6.
(End)

A208537 Number of 7-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.

Original entry on oeis.org

0, 0, 18, 312, 2340, 11160, 39990, 117648, 299592, 683280, 1428570, 2783880, 5118828, 8964072, 15059070, 24408480, 38347920, 58619808, 87460002, 127695960, 182857140, 257298360, 356336838, 486403632, 655210200, 871930800, 1147401450
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2012

Keywords

Comments

This sequence would be better defined as a(n) = (n^7-n)/7 with offset 0, which is an integer by Fermat's little theorem. - N. J. A. Sloane, Nov 13 2023
Row 7 of A208535.
Also, row 7 (with different offset) of A074650. - Eric M. Schmidt, Dec 08 2017

Examples

			All solutions for n=3:
..1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1
..2...2...2...3...2...2...2...2...2...3...3...3...2...2...2...2...2...2
..1...1...1...1...1...1...3...3...3...2...2...1...3...1...3...1...3...1
..2...3...2...3...3...3...2...1...2...3...1...3...2...2...1...3...1...2
..3...2...1...2...1...2...1...3...3...2...3...1...3...3...3...1...2...1
..1...3...3...3...2...1...3...1...2...3...2...3...1...2...2...3...3...2
..3...2...2...2...3...3...2...3...3...2...3...2...3...3...3...2...2...3
		

References

  • J. Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.

Crossrefs

Cf. A208535.

Programs

  • Mathematica
    A208537[n_]:=((n-1)^7-(n-1))/7;Array[A208537,50] (* Paolo Xausa, Nov 14 2023 *)
  • PARI
    Vec(6*x^3*(3 + 28*x + 58*x^2 + 28*x^3 + 3*x^4) / (1 - x)^8 + O(x^40)) \\ Colin Barker, Nov 11 2017

Formula

Empirical: a(n) = (1/7)*n^7 - 1*n^6 + 3*n^5 - 5*n^4 + 5*n^3 - 3*n^2 + (6/7)*n.
Empirical formula confirmed by Petros Hadjicostas, Nov 05 2017 (see A208535).
a(n+2) = delta(-n) = -delta(n) for n >= 0, where delta is the p-derivation over the integers with respect to prime p = 7. - Danny Rorabaugh, Nov 10 2017
From Colin Barker, Nov 11 2017: (Start)
G.f.: 6*x^3*(3 + 28*x + 58*x^2 + 28*x^3 + 3*x^4) / (1 - x)^8.
a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8) for n>8.
(End)
a(n) = ((n-1)^7 - (n-1))/7. (inspired by Hassler's formula in A208536) - Eric M. Schmidt, Dec 08 2017

A232210 Let b_k=3...3 consist of k>=1 3's. Then a(n) is the smallest k such that the concatenation prime(n)b_k is prime, or a(n)=0 if there is no such prime.

Original entry on oeis.org

1, 0, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 3, 1, 2, 6, 2, 2, 1, 1, 2, 1, 4, 4, 23, 1, 2, 1, 6, 2, 2, 5, 1, 10, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 2, 4, 2, 1, 1, 1, 2, 4, 1, 2, 5, 4, 2, 3, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 6, 4, 2, 14, 2, 4, 1, 3
Offset: 1

Views

Author

Vladimir Shevelev, Sep 13 2014

Keywords

Comments

Conjecture: for n>=3, a(n)>0.
Records are 1,14,23,50,252,4752,...
The corresponding primes are 2,13,131,653,883,1279,...
These primes beginning with the second one we call "stubborn primes".
Counter-conjecture: a(2889)=0. - Hans Havermann, Oct 15 2014
If a(n)=1, then the resulting primes are in A092993 and form A055782; if a(n)=2, then they form sequence 4133,4733,5333,7933,..., etc. - Vladimir Shevelev, Oct 16 2014
If a prime p divides Pb_k, then it also divides Pb_{k+m(p-1)} for all m>=0. This follows from Fermat's little theorem applied to b_x=(10^x-1)/3 with x=p-1. - M. F. Hasler, Oct 20 2014

Examples

			For n=1, start with prime(1)=2 and get already at the first step the prime 23. So a(1)=1.
For n=2, starting with prime(2)=3, one never gets a prime by appending further digits "3", therefore a(2)=0.
For n=3, n=4, n=5, one gets after the first step the primes 53, 73, 113, and therefore a(n)=1.
For n=6, start with prime(6)=13; one has to append 14 "3"s in order to get a new prime, so a(6)=14.
For n=2889, start with prime(2889) = 26293. (Do not mix up with prime(2899) = 26393...!) Appending 2k-1 or 6k-4 or 6k-2 or 18k-6 or 36k-18 or 180k-144 digits "3" yields a number divisible by 11 resp. 7 resp. 13 resp. 19 resp. 101 resp. 31. For 18k-12 and 36k (with k <> 1 (mod 5)) digits "3" there is no simple pattern and both yield sometimes large primes in the factorization, but (so far) always composite numbers 26293...3 (up to several thousand digits). - _M. F. Hasler_, Oct 16 2014
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime@ n}, While[ !PrimeQ[p*10^k + (10^k - 1)/3], k++]; k]; f[2] = 0; Array[f, 100] (* Robert G. Wilson v, Apr 24 2015 *)
    m3[n_]:=Module[{k=10n+3},While[!PrimeQ[k],k=10k+3];IntegerLength[k]-IntegerLength[ n]]; Join[{1,0},m3/@Prime[Range[3,90]]] (* Harvey P. Dale, Feb 11 2018 *)
  • PARI
    a(n) = {if (n==2, return (0)); p = prime(n); k = 1; while (! isprime(p = p*10+3), k++); k;} \\ Michel Marcus, Sep 13 2014

Extensions

More terms from Peter J. C. Moses, Sep 13 2014
Previous Showing 41-50 of 141 results. Next