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.

User: Frank Ellermann

Frank Ellermann's wiki page.

Frank Ellermann has authored 102 sequences. Here are the ten most recent ones:

A333772 a(n) = n * 2^n * (n!)^2.

Original entry on oeis.org

2, 32, 864, 36864, 2304000, 199065600, 22759833600, 3329438515200, 606790169395200, 134842259865600000, 35895009576222720000, 11277559372311429120000, 4129466323494701629440000, 1743270091026070964797440000, 840505222458998500884480000000
Offset: 1

Author

Frank Ellermann, Apr 05 2020

Keywords

Comments

Sum_{n>=1} a(n) / (2*n)! = Pi + 3.

Examples

			a(2) = 2 * 2^2 * ( 2! )^2 = 2 * 4 * 4 = 32.
a(3) = 3 * 2^3 * ( 3! )^2 = 3 * 8 * 36 = 864.
Sum_{n=1..10} a(n) / ( 2n )! = 3 + 3.01310...
Sum_{n=1..12} a(n) / ( 2n )! = 3 + 3.10046...
Sum_{n=1..18} a(n) / ( 2n )! = 3 + 3.14046...
Sum_{n=1..20} a(n) / ( 2n )! = 3 + 3.14126...
Sum_{n=1..23} a(n) / ( 2n )! = 3 + 3.14154...
		

Crossrefs

Cf. A001044 ( (n!)^2 ), A010050 ( (2n)! ), A000796 (digits of Pi).

Programs

  • Mathematica
    Table[n*2^n*(n!)^2,{n,20}] (* Harvey P. Dale, Jun 01 2024 *)
  • Rexx
    S = 2
    do N = 2 while length( S ) < 255
       S = S || ', ' || N * ( 2 ** N ) * ( !( N ) ** 2 )
    end N
    say S                         ;  return S

A333436 Partition numbers A000041(k*x_n + y_n) are known to be divisible by prime(n); sequence gives the list of x_n.

Original entry on oeis.org

5, 7, 11, 17303, 206839, 1977147619
Offset: 3

Author

Frank Ellermann, Mar 21 2020

Keywords

Comments

Grime notes that Ramanujan's pattern for a(3), a(4), a(5) or prime(3), prime(4), prime(5) cannot be directly extended to prime(6) = 13, and shows solutions for 13, 17, 19.

Examples

			All {partition( 5k+4)} are divisible by prime(3) = 5, so a(3) = 5.
All {partition( 7k+5)} are divisible by prime(4) = 7, so a(4) = 7.
All {partition(11k+6)} are divisible by prime(5) = 11, so a(5) = 11.
		

Crossrefs

Cf. A333435 (x_n), A000040 (primes), A000041 (partitions).
Cf. A071734 (p(5k+4)/5), A071746 (p(7k+5)/7), A076394 (p(11k+6)/11).
Cf. A213260 (p(5k+4)).

A333435 Partition numbers A000041(k*x_n + y_n) are known to be divisible by prime(n); sequence gives the list of y_n.

Original entry on oeis.org

4, 5, 6, 237, 2623, 815655
Offset: 3

Author

Frank Ellermann, Mar 21 2020

Keywords

Comments

Grime notes that Ramanujan's pattern for a(3), a(4), a(5) or prime(3), prime(4), prime(5) cannot be directly extended to prime(6) = 13, and shows solutions for 13, 17, 19.

Examples

			All {partition( 5k+4)} are divisible by prime(3) = 5, so a(3) = 4.
All {partition( 7k+5)} are divisible by prime(4) = 7, so a(4) = 5.
All {partition(11k+6)} are divisible by prime(5) = 11, so a(5) = 6.
		

Crossrefs

Cf. A333436 (y_n), A000040 (primes), A000041 (partitions).
Cf. A071734 (p(5k+4)/5), A071746 (p(7k+5)/7), A076394 (p(11k+6)/11).
Cf. A213260 (p(5k+4)).

A332772 Numbers k > 0 such that 30k +- 7 is prime.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 12, 13, 15, 19, 20, 25, 26, 29, 32, 33, 37, 41, 43, 48, 52, 53, 54, 58, 66, 67, 76, 78, 81, 85, 88, 89, 90, 92, 95, 97, 101, 107, 118, 120, 121, 128, 129, 134, 143, 150, 153, 155, 165, 166, 172, 178, 180, 194, 195, 202, 207, 209, 211, 212
Offset: 1

Author

Frank Ellermann, Feb 25 2020

Keywords

Comments

Looking for prime factors > 5=prime(3) in 8=A005867(3) candidates mod 30=A002110(3) two candidates in the form 30k +- 7 with k > 0 never belong to a twin prime pair. Twin primes can be (30k-13, 30k-11) A331840, (30k-1, 30k +1) A176114, or (30k+11, 30k+13) A089160.

Examples

			a(4)=4 for prime(30)=113=4*30-7 and prime(31)=127=4*30+7.
a(5)=9 for prime(56)=263=9*30-7 and prime(59)=277=9*30+7.
		

Crossrefs

Subsequence of A158573. Prime pairs 30k +- 7 in A329262.

Programs

  • Mathematica
    Select[Range@ 215, AllTrue[30 # + {-7, 7}, PrimeQ] &] (* Michael De Vlieger, Feb 25 2020 *)
  • Rexx
    S = 1
    do N = 2 while length( S ) < 255
       if NOPRIME( N * 30 + 7 )   then  iterate N
       if NOPRIME( N * 30 - 7 )   then  iterate N
       S = S || ',' N
    end N
    say S

A331840 Numbers k such that 30*k-13, 30*k-11 are twin primes.

Original entry on oeis.org

1, 4, 5, 7, 8, 12, 21, 28, 29, 43, 48, 50, 54, 56, 57, 60, 63, 67, 68, 70, 75, 76, 89, 90, 106, 109, 116, 118, 119, 126, 131, 138, 139, 141, 145, 151, 152, 155, 160, 166, 181, 183, 189, 196, 207, 228, 232, 238, 244, 249, 250, 252, 259, 263, 270, 280, 285, 287
Offset: 1

Author

Frank Ellermann, Feb 26 2020

Keywords

Comments

All twin primes > 7 have the form 30*k-{13,11}, or 30*k +-1 (A176114), or 30*k+{11,13} (A089160).
All twin primes > 7 with least significant decimal digit 7 have the form 30*k-13.
All twin primes > 7 with least significant decimal digit 3 have the form 30*k+13.

Examples

			1 is a term because 1*30 - 13 =  17 = prime(6)  and 1*30 - 11 =  19 = prime(7).
4 is a term because 4*30 - 13 = 107 = prime(28) and 4*30 - 11 = 109 = prime(29).
5 is a term because 5*30 - 13 = 137 = prime(33) and 5*30 - 11 = 139 = prime(34).
		

Programs

  • Mathematica
    Select[Range[300], And @@ PrimeQ[30*# - {11, 13}] &] (* Amiram Eldar, Feb 29 2020 *)
  • PARI
    isok(k) = isprime(30*k-13) && isprime(30*k-11); \\ Michel Marcus, Feb 29 2020
  • Rexx
    S = 1
    do N = 2 while length( S ) < 255
       if NOPRIME( N*30 -13 )  then  iterate N
       if NOPRIME( N*30 -11 )  then  iterate N
       S = S || ',' N
    end N
    say S
    

Formula

a(n) = A089161(n)+1.

A333058 0, 1, or 2 primes at primorial(n) +- 1.

Original entry on oeis.org

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

Author

Frank Ellermann, Mar 06 2020

Keywords

Comments

a(n) = 0 marks a prime gap size of at least 2*prime(n+1)-1, e.g., primorial(8) +- prime(9) = {9699667,9699713} are primes, gap 2*23-1.
Mathworld reports that it is not known if there are an infinite number of prime Euclid numbers.
The tables in Ondrejka's collection contain no further primorial twin primes after {2309,2311} = primorial(13) +- 1 up to primorial(15877) +- 1 with 6845 digits.

Examples

			a(2) = a(3) = a(5) = 2: 2*3 +-1 = {5,7}, 6*5 +-1 = {29,31} and 210*11 +-1 = {2309,2311} are twin primes.
a(1) = a(4) = a(6) = 1: 1, 30*7 - 1 = 209 and 2310*13 + 1 = 30031 are not primes.
a(7) = 0: 510509 = 61 * 8369 and 510511 = 19 * 26869 are not primes.
		

References

  • H. Dubner, A new primorial prime, J. Rec. Math., 21 (No. 4, 1989), 276.

Crossrefs

Cf. A096831, A002110 (primorials, p#), A057706.
Cf. A006862 (Euclid, p#+1), A005234 (prime p#+1), A014545 (index prime p#+1).
Cf. A057588 (Kummer, p#-1), A006794 (prime p#-1), A057704 (index prime p#-1).
Cf. A010051, A088411 (where a(n) is positive), A088257.

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, ithprime(n)*p(n-1)) end:
    a:= n-> add(`if`(isprime(p(n)+i), 1, 0), i=[-1, 1]):
    seq(a(n), n=0..120);  # Alois P. Heinz, Mar 18 2020
  • Mathematica
    primorial[n_] := primorial[n] = Times @@ Prime[Range[n]];
    a[n_] := Boole@PrimeQ[primorial[n] - 1] + Boole@PrimeQ[primorial[n] + 1];
    a /@ Range[0, 105] (* Jean-François Alcover, Nov 30 2020 *)
  • Rexx
    S = ''                     ;  Q = 1
    do N = 1 to 27
       Q = Q * PRIME( N )
       T = ISPRIME( Q - 1 ) + ISPRIME( Q + 1 )
       S = S || ',' T
    end N
    S = substr( S, 3 )
    say S                      ;  return S

Formula

a(n) = [ isprime(primorial(n) - 1) ] + [ isprime(primorial(n) + 1) ].
a(n) = Sum_{i in {-1,1}} A010051(primorial(n) + i).

A329269 Integers k such that 8*k + 1 is a prime or a square.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 9, 10, 11, 12, 14, 15, 17, 21, 24, 28, 29, 30, 32, 35, 36, 39, 42, 44, 45, 50, 51, 54, 55, 56, 57, 65, 66, 71, 72, 74, 75, 77, 78, 80, 84, 91, 95, 96, 101, 105, 107, 110, 116, 117, 119, 120, 122, 126, 129, 131, 136, 137, 141, 144, 149, 150
Offset: 1

Author

Frank Ellermann, Feb 23 2020

Keywords

Comments

All odd squares have the form 8*n + 1.

Examples

			8*0 + 1 =  1 = 1^2, so 0 is a term;
8*1 + 1 =  9 = 3^2, so 1 is a term;
8*2 + 1 = 17 = prime(7), so 2 is a term;
8*3 + 1 = 25 = 5^2, so 3 is a term;
8*4 + 1 = 33 is neither prime nor square, so 4 is not a term;
8*5 + 1 = 41 = prime(13), so 5 is a term.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, theorem 14 and ch. 4.5

Crossrefs

Union of the triangular numbers A000217 and A005123.
Cf. A000040, A016754 (odd squares).

Programs

  • Maple
    q:= k-> (t-> isprime(t) or issqr(t))(8*k+1):
    select(q, [$0..200])[];  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    Select[Range[0, 150], PrimeQ[(m = 8*# + 1)] || IntegerQ @ Sqrt[m] &] (* Amiram Eldar, Feb 29 2020 *)
  • PARI
    isok(k) = my(x=8*k+1); isprime(x) || issquare(x); \\ Michel Marcus, Feb 27 2020
  • Rexx
    S = 0 ;  U = 1 ;  P = 1
    do N = 1 while length( S ) < 256
       C = 8 * N + 1
       do I = U by 2
          K = I * I      ;  if K > C then  leave I
          U = I          ;  if K < C then  iterate I
          S = S || ',' N ;  iterate N
       end I
       do I = P
          K = PRIME( I ) ;  if K > C then  leave I
          P = I          ;  if K < C then  iterate I
          S = S || ',' N ;  iterate N
       end I
    end N
    say S ;  return S
    

A328525 Numbers k such that (k-1)*k*(k+1) = (k-1)*(1+u) = k*(1+v) = (k+1)*(1+w) with primes u, v, w.

Original entry on oeis.org

3, 5, 9, 21, 55, 131, 145, 155, 231, 259, 265, 449, 495, 561, 595, 1045, 1051, 1365, 1409, 1491, 1549, 1849, 1989, 2001, 2101, 2469, 2785, 3365, 3621, 3641, 3669, 3845, 3911, 4285, 4951, 5181, 5465, 6049, 6699, 7189, 7229, 8219, 8629, 9175, 9521, 9539, 9631, 9729
Offset: 1

Author

Frank Ellermann, Feb 24 2020

Keywords

Examples

			3 is a term because 2*3*4 = 2*(1+11) = 3*(1+7) = 4*(1+5) with primes 11, 7, 5.
9 is a term because 8*9*10 = 8*(1+89) = 9*(1+79) = 10*(1+71) with primes 89, 79, 71.
		

Crossrefs

Cf. A000040.
Intersection of A002328, A028870 and A045546.

Programs

  • Maple
    q:= k-> andmap(isprime, (t-> [t-1, t-k, t+k])(k^2-1)):
    select(q, [$1..10000])[];  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    Select[Range[2, 10^4], AllTrue[{(# - 1)*#, #*(# + 1), (# + 1)*(# - 1)} - 1, PrimeQ] &] (* Amiram Eldar, Feb 24 2020 *)
  • PARI
    isok(k) = isprime(k*(k+1)-1) && isprime((k+1)*(k-1)-1) && isprime(k*(k-1)-1); \\ Michel Marcus, Feb 25 2020
  • Rexx
    S = 3
    do N = 5 to 595 by 2
       if NOPRIME( N*N +N -1 ) then  iterate N
       if NOPRIME( N*N    -2 ) then  iterate N
       if NOPRIME( N*N -N -1 ) then  iterate N
       S = S || ',' N
    end N
    say S
    

Extensions

More terms from Amiram Eldar, Feb 24 2020

A333355 Number of bits in binary expansion of n minus the number of digits of n when written in base 3.

Original entry on oeis.org

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

Author

Frank Ellermann, Mar 15 2020

Keywords

Comments

Record highs are at n = 2^A054414. All n=2^k >= 2 are increases, all n=3^j are decreases, and there is either one or none 3^j between 2^(k-1) and 2^k. When one, a(2^k) = a(2^(k-1)) so not a record high. When none, a(2^k) = a(2^(k-1)) + 1 which is a record high. If 2^k and 2^(k-1) are the same length in ternary then there is no 3^j between them. This is when 2^k has most significant ternary digit 2 since 2^(k-1) >= 3^j is 2^k >= 2*3^j. These k are A054414. Non-record increases are at its complement n = 2^A020914 >= 2. - Kevin Ryde, Apr 04 2020

Examples

			a(8) = 2 = 4 - 2 for binary 1000 and ternary 22.
a(64) = 3 = 7 - 4 for binary 1000000 and ternary 2101.
		

Crossrefs

Cf. A007088 ( binary), A000523 (floor(log_2(n))), A029837.
Cf. A007089 (ternary), A062153 (floor(log_3(n))), A117966.

Programs

  • Maple
    a:= n-> ilog[2](n)-ilog[3](n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 15 2020
  • Mathematica
    a[n_]: = Floor @ Log[2, n] - Floor @ Log[3, n]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
  • PARI
    a(n) = logint(n,2) - logint(n,3); \\ Kevin Ryde, May 15 2020
  • Rexx
    L = 1 ;  M = 1 ;  B = 2 ;  T = 3       ;  S = 0
    do N = 2 while length( S ) < 258
       if B = N then  do    ;  B = B * 2   ;  L = L + 1   ;  end
       if T = N then  do    ;  T = T * 3   ;  M = M + 1   ;  end
       S = S || ',' L - M
    end N
    say S                   ;  return S
    

Formula

a(n) = A000523(n) - A062153(n) = floor(log_2(n)) - floor(log_3(n)).
a(n) = length(A007088(n)) - length(A007089(n)).

A332799 Numbers whose smallest prime factor is 17.

Original entry on oeis.org

17, 289, 323, 391, 493, 527, 629, 697, 731, 799, 901, 1003, 1037, 1139, 1207, 1241, 1343, 1411, 1513, 1649, 1717, 1751, 1819, 1853, 1921, 2159, 2227, 2329, 2363, 2533, 2567, 2669, 2771, 2839, 2941, 3043, 3077, 3247, 3281, 3349, 3383, 3587, 3791, 3859, 3893
Offset: 1

Author

Frank Ellermann, Feb 24 2020

Keywords

Comments

The asymptotic density of this sequence is 192/17017. - Amiram Eldar, Dec 06 2020

Examples

			a(2) = 17*17, a(3) = 17*19.
		

References

  • Emmanuel Desurvire, Classical and Quantum Information Theory: An Introduction for the Telecom Scientist, Cambridge University Press, 2009, table 20.5 p. 421.

Crossrefs

Cf. A084967 (5), A084968 (7), A084969 (11), A084970 (13), A332798 (19), A332797 (23), A008366 (17-rough numbers).

Programs

  • Mathematica
    17 * Select[Range[230], CoprimeQ[#, 30030] &] (* Amiram Eldar, Feb 24 2020 *)
  • Rexx
    P = 17         ;  S = P
    do N = P by 2 while length( S ) < 255
       do I = 1 until P = X
          X = PRIME( I )
          if P = X       then  leave I
          if N // X = 0  then  iterate N
       end I
       S = S || ',' P*N
    end N
    say S          ;  return S

Formula

a(n) = 17*A008366(n).