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: Karl V. Keller, Jr.

Karl V. Keller, Jr.'s wiki page.

Karl V. Keller, Jr. has authored 57 sequences. Here are the ten most recent ones:

A309434 a(n) = floor(n*Im(2*e^(i*Pi/5))/(Im(2*e^(i*Pi/5)) - 1)).

Original entry on oeis.org

6, 13, 20, 26, 33, 40, 46, 53, 60, 66, 73, 80, 87, 93, 100, 107, 113, 120, 127, 133, 140, 147, 154, 160, 167, 174, 180, 187, 194, 200, 207, 214, 220, 227, 234, 241, 247, 254, 261, 267, 274, 281, 287, 294, 301, 308, 314, 321, 328, 334, 341
Offset: 1

Author

Karl V. Keller, Jr., Jun 06 2020

Keywords

Comments

This is the Beatty sequence for Im(2*e^(i*Pi/5))/(Im(2*e^(i*Pi/5)) - 1).
This is the complement of A335137.
Im(2*e^(i*Pi/5))/(Im(2*e^(i*Pi/5)) - 1) = (5 + sqrt(5))/2 + sqrt(5 + 2*sqrt(5)) = 6.695717525925148250774877410... = 2 + phi + tan(2*Pi/5) = A296184 + A019970.
For n < 10, a(n) = A109235(n).
Re(2*e^(i*Pi/5))/(Re(2*e^(i*Pi/5)) - 1) = (3 + sqrt(5))/2 = 1 + phi = phi^2 = A104457.
Floor(n*Re(2*e^(i*Pi/5))/(Re(2*e^(i*Pi/5)) - 1)) is A001950 (floor(n*phi^2)).

Examples

			For n = 3, floor(3*6.69571) = 20.
		

Programs

  • Mathematica
    a[n_] := Floor[n * Im[2 * Exp[I * Pi/5]]/(Im[2 * Exp[I * Pi/5]] - 1)]; Array[a, 100] (* Amiram Eldar, Jul 06 2020 *)
  • Python
    from sympy import floor, im, exp, I, pi
    for n in range(1, 101): print(floor(n*im(2*exp(I*pi/5))/(im(2*exp(I*pi/5)) - 1)), end=', ')
    
  • Python
    from sympy import floor, sqrt
    for n in range(1, 101): print(floor(n*((5 + sqrt(5))/2 + sqrt(5 + 2*sqrt(5)))), end=', ')

A335137 a(n) = floor(n*Im(2*e^(i*Pi/5))).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72
Offset: 1

Author

Karl V. Keller, Jr., May 24 2020

Keywords

Comments

This is the Beatty sequence for imaginary part of 2*e^(i*Pi/5).
Im(2*e^(i*Pi/5)) = A182007 = 1.1755705045849462583374119... = 2*sin(Pi/5).
The real part of floor(n*2*e^(i*Pi/5)) is A000201 (floor(n*phi)).
Re(2*e^(i*Pi/5)) = A001622 = phi = (1 + sqrt(5))/2.
For n < 57, a(n) = A109234(n).

Examples

			For n = 3, floor(3*1.17557) = 3.
		

Crossrefs

Programs

  • Mathematica
    Array[Floor[# Im[2 E^(I*Pi/5)]] &, 62] (* Michael De Vlieger, May 24 2020 *)
  • Python
    from sympy import floor, im, exp, I, pi
    for n in range(1, 101): print(floor(n*im(2*exp(I*pi/5))), end=', ')

A274045 Primes p such that p + 72 is the next prime.

Original entry on oeis.org

31397, 360091, 507217, 517639, 633667, 650107, 705317, 749471, 753859, 770669, 809629, 818021, 828277, 1001839, 1025957, 1087159, 1133387, 1145899, 1152421, 1164101, 1206869, 1207769, 1210639, 1241087, 1278911, 1290719, 1351997
Offset: 1

Author

Karl V. Keller, Jr., Jun 07 2016

Keywords

Comments

This sequence is a subsequence of A156105 (p and p + 72 are primes).

Examples

			For 31397, the next prime is 31397 + 72 = 31469.
For 360091, the next prime is 360091 + 72 = 360163.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[105000]],2,1],#[[2]]-#[[1]]==72&][[All,1]] (* Harvey P. Dale, Dec 19 2021 *)
  • PARI
    is(n)=isprime(n) && nextprime(n+1)-n==72 \\ Charles R Greathouse IV, Jun 19 2016
  • Python
    from sympy import isprime,nextprime
    for i in range(3,1500001,2):
      if isprime(i) and nextprime(i) == i+72: print(i,end=', ')
    

A274042 Numbers k such that k - 53, k - 1, k + 1, k + 53 are consecutive primes.

Original entry on oeis.org

9401700, 64312710, 78563130, 83494350, 92978310, 101520540, 111105090, 121631580, 136765860, 138330780, 139027950, 145673850, 157008390, 163050090, 166418280, 169288530, 170473410, 177920850, 198963210, 200765250, 213504870, 220428600
Offset: 1

Author

Karl V. Keller, Jr., Jun 07 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs), A249674 (divisible by 30) and A256753.
The numbers n - 53 and n + 1 belong to A204665 (p such that p + 52 is the next prime).
The numbers n - 53 and n - 1 belong to primes p such that p + 54 is prime.

Examples

			9401700 is the average of the four consecutive primes 9401647, 9401699, 9401701, 9401753.
64312710 is the average of the four consecutive primes 64312657, 64312709, 64312711, 64312763.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    Select[Partition[Prime[Range[122*10^5]],4,1],Differences[#]=={52,2,52}&][[All,2]]+1 (* Harvey P. Dale, Mar 07 2018 *)
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,250000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-53 and nextprime(i+1) == i+53: print (i,end=', ')

A273356 Numbers n such that n - 49, n - 1, n + 1, n + 49 are consecutive primes.

Original entry on oeis.org

913638, 2763882, 4500492, 6220518, 6473148, 13884468, 15131982, 15729942, 19671930, 20494602, 21372888, 23791350, 25541028, 29535348, 30787788, 30906768, 32085372, 34128168, 34139802, 34550430, 35989980, 37473180, 37784310, 38106372
Offset: 1

Author

Karl V. Keller, Jr., May 20 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs) and A256753.
The terms ending in 0 belong to A249674 (divisible by 30).
The terms ending in 2 (resp. 8) are congruent to 12 (resp. 18) mod 30.
The numbers n - 49 and n + 1 belong to A134123 (p such that p + 48 is the next prime).
The numbers n - 49 and n - 1 belong to A062284 (p and p + 50 are primes).

Examples

			913638 is the average of the four consecutive primes 913589, 913637, 913639, 913687.
2763882 is the average of the four consecutive primes 2763833, 2763881, 2763883, 2763931.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    Mean/@Select[Partition[Prime[Range[2325200]],4,1],Differences[#]=={48,2,48}&] (* Harvey P. Dale, Feb 10 2024 *)
  • PARI
    is(n)=isprime(n-1) && isprime(n+1) && precprime(n-2)==n-49 && nextprime(n+2)==n+49 \\ Charles R Greathouse IV, Jun 08 2016
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,60000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-49 and nextprime(i+1) == i+49: print (i,end=', ')
    

A273355 Numbers n such that n - 47, n - 1, n + 1, n + 47 are consecutive primes.

Original entry on oeis.org

15370470, 15462870, 18216510, 23726160, 30637050, 31054740, 38907060, 39220080, 44499900, 44678190, 60563100, 66248550, 86219910, 87095190, 87948780, 93773970, 96802860, 103011990, 105953760, 105978330, 106960410, 111219990, 116281770
Offset: 1

Author

Karl V. Keller, Jr., May 20 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs), A249674 (divisible by 30) and A256753.
The numbers n - 47 and n + 1 belong to A134122 (p such that p + 46 is the next prime).
The numbers n - 47 and n - 1 belong to primes p such that p and p + 48 are primes.

Examples

			15370470 is the average of the four consecutive primes 15370423, 15370469, 15370471, 15370517.
15462870 is the average of the four consecutive primes 15462823, 15462869, 15462871, 15462917.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • PARI
    is(n)=isprime(n-1) && isprime(n+1) && precprime(n-2)==n-47 && nextprime(n+2)==n+47 \\ Charles R Greathouse IV, Jun 08 2016
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,160000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-47 and nextprime(i+1) == i+47: print (i,end=', ')
    

A273101 Numbers n such that n - 43, n - 1, n + 1, n + 43 are consecutive primes.

Original entry on oeis.org

7714800, 8126820, 8341260, 8646060, 9200880, 9422970, 13224270, 13597920, 14012460, 14124630, 15305700, 17008680, 17563920, 18830940, 22603740, 22812150, 24576240, 25197300, 26147040, 26196900, 26932950, 27225240, 30305580, 31214640
Offset: 1

Author

Karl V. Keller, Jr., May 15 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs), A249674 (divisible by 30) and A256753.
The numbers n - 43 and n + 1 belong to A272176 (p and p + 44 are primes) and A134120 (p such that p + 42 is the next prime).
The numbers n - 43 and n - 1 belong to A271982 (p and p + 42 are primes).

Examples

			7714800 is the average of the four consecutive primes 7714757, 7714799, 7714801, 7714843.
8126820 is the average of the four consecutive primes 8126777, 8126819, 8126821, 8126863.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • PARI
    is(n)=n%30==0 && isprime(n-1) && isprime(n+1) && nextprime(n+2)==n+43 && precprime(n-2)==n-43 \\ Charles R Greathouse IV, May 15 2016
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,60000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-43 and nextprime(i+1) == i+43: print (i,end=', ')
    

A271323 Numbers n such that n - 41, n - 1, n + 1, n + 41 are consecutive primes.

Original entry on oeis.org

383220, 1269642, 1528938, 2590770, 3014700, 3158298, 3697362, 3946338, 4017312, 4045050, 4545642, 4711740, 4851618, 4871568, 5141178, 5194602, 5925042, 5972958, 5990820, 6075030, 6179862, 6212202, 6350760, 6442938, 6549312, 6910638, 6912132
Offset: 1

Author

Karl V. Keller, Jr., May 15 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs) and A256753.
The terms ending in 0 belong to A249674 (divisible by 30).
The terms ending in 2 (resp. 8) are congruent to 12 (resp. 18) mod 30.
The numbers n - 40 and n + 1 belong to A126721 (p such that p + 40 is the next prime) and A271981 (p and p + 40 are primes).
The numbers n - 40 and n - 1 belong to A271982 (p and p + 42 are primes).

Examples

			383220 is the average of the four consecutive primes 383179, 383219, 383221, 383261.
1269642 is the average of the four consecutive primes 1269601, 1269641, 1269643, 1269683.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    Mean/@Select[Partition[Prime[Range[472000]],4,1],Differences[#] == {40,2,40}&] (* Harvey P. Dale, Oct 16 2021 *)
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,12000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-41 and nextprime(i+1) == i+41: print (i,end=', ')

A272176 Primes p such that p + 44 is also prime.

Original entry on oeis.org

3, 17, 23, 29, 53, 59, 83, 107, 113, 137, 149, 167, 179, 197, 227, 233, 239, 263, 269, 293, 353, 389, 419, 443, 479, 503, 557, 563, 569, 587, 599, 617, 647, 683, 743, 809, 839, 863, 947, 953, 977, 1019, 1049, 1109, 1187, 1193, 1259, 1277, 1283
Offset: 1

Author

Karl V. Keller, Jr., Apr 21 2016

Keywords

Comments

A134121 is a subsequence of this sequence.

Examples

			3 is a term because 3 + 44 = 47 is also prime.
17 is a term because 17 + 44 = 61 is also prime.
		

Crossrefs

Programs

  • PARI
    lista(nn) = forprime(p=2, nn, if(isprime(p+44), print1(p, ", "))); \\ Altug Alkan, Apr 21 2016
  • Python
    from sympy import isprime
    for i in range(3, 3001, 2):
        if isprime(i) and isprime(i + 44): print(i, end=', ')
    

A271981 Primes p such that p + 40 is also prime.

Original entry on oeis.org

3, 7, 13, 19, 31, 43, 61, 67, 73, 97, 109, 127, 139, 151, 157, 193, 199, 211, 223, 229, 241, 271, 277, 307, 313, 349, 379, 409, 421, 439, 463, 523, 547, 577, 601, 607, 613, 619, 643, 661, 733, 757, 769, 787, 823, 907, 937, 991, 1009, 1021, 1051, 1063, 1069
Offset: 1

Author

Karl V. Keller, Jr., Apr 17 2016

Keywords

Comments

A126721 is a subsequence of this sequence.

Examples

			3 is a term since 3 + 40 = 43 is also prime.
7 is a term since 7 + 40 = 47 is also prime.
		

Crossrefs

Programs

  • Maple
    q:= n-> andmap(isprime, [n, n+40]):
    select(q, [$2..2000])[];  # Alois P. Heinz, Jul 21 2022
  • Mathematica
    Select[Prime@ Range@ 180, PrimeQ[# + 40] &] (* Michael De Vlieger, Apr 18 2016 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (isprime(p+40), print1(p, ", "))); \\ Michel Marcus, Apr 19 2016
  • Python
    from sympy import isprime
    for i in range(3, 2001,2):
         if isprime(i) and isprime(i+40): print (i,end=', ')