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 10 results.

A180130 Smallest k such that k*2^n is a sum of two successive primes.

Original entry on oeis.org

5, 4, 2, 1, 7, 4, 2, 1, 9, 15, 8, 4, 2, 1, 25, 19, 11, 12, 6, 3, 10, 5, 35, 33, 52, 26, 13, 28, 14, 7, 15, 38, 19, 45, 47, 26, 13, 43, 84, 42, 21, 39, 35, 18, 9, 46, 23, 43, 49, 104, 52, 26, 13, 48, 24, 12, 6, 3, 21, 36, 18, 9, 15, 15, 9, 42, 21, 23, 67, 62, 31, 64, 32, 16, 8, 4, 2, 1, 45
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 2), then a(n+1) = a(n)/2.
Records: 5, 7, 9, 15, 25, 35, 52, 84, 104, 146, 284, 330, 645, 660, 1020, 1677, 1701, 1747, 2247, 2991, ..., .
Corresponding primes are twin primes for n = 0, 1, 2, 3, 8, 17, 18, 19, 23, 43, 44, 64, 156, 189, 190, 210, 211, 212, 264, 265, 281, 282, 283, 388, 547, 725, 726, 727, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 2^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 79, 0]
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      k, pow2 = 1, 2**n
      while not ok(k*pow2): k += 1
      return k
    print([a(n) for n in range(79)]) # Michael S. Branicky, May 04 2021

A180131 Smallest k such that k*3^n is a sum of two successive primes.

Original entry on oeis.org

5, 4, 2, 6, 2, 10, 20, 26, 22, 10, 16, 8, 8, 72, 24, 8, 18, 6, 2, 6, 2, 10, 20, 20, 22, 20, 52, 50, 104, 118, 84, 28, 38, 306, 102, 34, 100, 50, 30, 10, 192, 64, 46, 66, 22, 220, 84, 28, 176, 88, 30, 10, 8, 152, 292, 98, 82, 124, 160, 206, 106, 106, 160, 128, 78, 26, 110, 80
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 3), then a(n+1) = a(n)/3.
Records: 5, 6, 10, 20, 26, 72, 104, 118, 306, 320, 348, 572, 824, 828, 972, 1054, 1110, 1540, ..., .
Corresponding primes are twin primes for n = 0, 1, 10, 13, 14, 15, 22, 102, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 3^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      k, pow3 = 1, 3**n
      while not ok(k*pow3): k += 1
      return k
    print([a(n) for n in range(68)]) # Michael S. Branicky, May 04 2021

A180132 Smallest k such that k*5^n is a sum of two successive primes.

Original entry on oeis.org

5, 1, 4, 10, 2, 8, 12, 12, 36, 12, 28, 66, 30, 6, 18, 132, 36, 108, 34, 14, 48, 60, 12, 22, 150, 30, 6, 74, 54, 16, 8, 66, 150, 30, 6, 14, 374, 110, 22, 82, 62, 66, 108, 348, 114, 428, 190, 38, 570, 114, 102, 24, 82, 86, 178, 420, 84, 108, 328, 186, 126, 192, 76, 82, 24
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 5), then a(n+1) = a(n)/5.
Records: 5, 10, 12, 36, 66, 132, 150, 374, 428, 570, 734, 840, 1938, 2036, 2220, 2968, 3132, 3444, 4014, 6090, ..., .
Corresponding primes are twin primes for n = 0, 1, 51, 102, 103, 202, 275, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 5^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import nextprime, prevprime
    def sum2succ(n): return n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      if n < 2: return [5, 1][n]
      k, pow5 = 1, 5**n
      while not sum2succ(k*pow5): k += 1
      return k
    print([a(n) for n in range(65)]) # Michael S. Branicky, May 01 2021

A180133 Smallest k such that k*6^n is a sum of two successive primes.

Original entry on oeis.org

5, 2, 1, 1, 4, 12, 2, 1, 4, 3, 5, 8, 7, 34, 8, 11, 33, 26, 13, 9, 13, 90, 15, 40, 30, 5, 43, 9, 69, 38, 27, 79, 47, 9, 36, 6, 1, 92, 44, 51, 50, 16, 81, 21, 9, 50, 84, 14, 45, 59, 124, 215, 36, 6, 1, 20, 31, 35, 33, 46, 18, 3, 23, 114, 19, 41, 84, 14, 8, 35, 114, 19, 73, 14, 39, 68, 42
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 6), then a(n+1) = a(n)/6.
Records: 5, 12, 34, 90, 92, 124, 215, 249, 592, 601, 1099, 1282, 1406, 1589, 1700, 2688, ..., .
Corresponding primes are twin primes for n = 0, 1, 2, 3, 4, 7, 13, 15, 28, 69, 120, 162, 251, 257, 279 ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 6^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import nextprime, prevprime
    def sum2succ(n): return n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      if n == 0: return 5
      k, pow6 = 1, 6**n
      while not sum2succ(k*pow6): k += 1
      return k
    print([a(n) for n in range(77)]) # Michael S. Branicky, May 02 2021

A180134 Smallest k such that k*7^n is a sum of two successive primes.

Original entry on oeis.org

5, 6, 18, 10, 30, 18, 4, 28, 4, 30, 30, 60, 120, 38, 12, 6, 52, 120, 70, 10, 102, 60, 70, 10, 186, 174, 42, 6, 90, 146, 154, 22, 18, 140, 20, 168, 24, 240, 60, 80, 26, 286, 154, 22, 12, 196, 28, 4, 2, 128, 116, 156, 422, 130, 204, 84, 12, 118, 88, 240, 536, 564, 798, 114
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 7), then a(n+1) = a(n)/7.
Records: 5, 6, 18, 30, 60, 120, 186, 240, 286, 422, 536, 564, 798, 1010, 1074, 1334, 1434, 1474, 3706, 4108, 4370, 6160, ..., .
Corresponding prime are twin primes for n = 0, 17, 369, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 7^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      k, pow7 = 1, 7**n
      while not ok(k*pow7): k += 1
      return k
    print([a(n) for n in range(64)]) # Michael S. Branicky, May 06 2021

A180135 Smallest k such that k*11^n is a sum of two successive primes.

Original entry on oeis.org

5, 18, 6, 24, 6, 32, 40, 26, 20, 94, 50, 26, 10, 168, 30, 18, 196, 126, 70, 166, 30, 54, 130, 26, 50, 10, 40, 28, 20, 120, 84, 26, 228, 336, 92, 174, 24, 308, 28, 102, 216, 232, 68, 112, 192, 252, 512, 302, 110, 10, 330, 30, 138, 150, 168, 770, 70, 264, 24, 72, 180, 198
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 11), then a(n+1) = a(n)/11.
Records: 5, 18, 24, 32, 40, 94, 168, 196, 228, 336, 512, 770, 996, 1446, 1644, 1812, 1900, 3840, ..., .
Corresponding primes are twin primes for n = 0, 3, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 11^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      k, pow11 = 1, 11**n
      while not ok(k*pow11): k += 1
      return k
    print([a(n) for n in range(62)]) # Michael S. Branicky, May 18 2021

A180136 Smallest k such that k*12^n is a sum of two successive primes.

Original entry on oeis.org

5, 1, 1, 2, 18, 8, 13, 6, 2, 11, 11, 39, 20, 12, 1, 8, 9, 31, 182, 24, 2, 126, 128, 66, 9, 86, 146, 43, 170, 49, 155, 119, 115, 21, 77, 18, 60, 5, 119, 81, 27, 45, 81, 23, 28, 134, 14, 262, 131, 86, 55, 7, 549, 81, 199, 107, 100, 184, 85, 80, 32, 43, 118, 299, 43, 224, 187
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 12), then a(n+1) = a(n)/12.
Records: 5, 18, 39, 182, 262, 549, 752, 811, 1456, ..., .
Corresponding primes are twin primes for n = 0, 1, 2, 5, 15, 26, 28, 55, 72, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 12^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import nextprime, prevprime
    def sum2succ(n): return n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      if n == 0: return 5
      k, pow12 = 1, 12**n
      while not sum2succ(k*pow12): k += 1
      return k
    print([a(n) for n in range(67)]) # Michael S. Branicky, May 01 2021

A180137 Smallest k such that k*13^n is a sum of two successive primes.

Original entry on oeis.org

5, 4, 24, 4, 8, 22, 40, 4, 14, 16, 28, 10, 266, 40, 20, 46, 112, 156, 12, 20, 228, 26, 2, 220, 60, 140, 92, 42, 316, 132, 84, 70, 68, 50, 280, 164, 112, 146, 148, 30, 36, 126, 390, 30, 30, 38, 462, 114, 14, 86, 56, 168, 1600, 224, 104, 8, 72, 434, 142, 60, 750, 202, 318
Offset: 0

Views

Author

Keywords

Comments

If a(n) == 0 (mod 13), then a(n+1) = a(n)/13.
Records: 5, 24, 40, 266, 316, 390, 462, 1600, 2616, 5834, ..., .
Corresponding primes are twin primes for n = 0, 2, ..., .

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, j = 13^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def a(n):
      k, pow13 = 1, 13**n
      while not ok(k*pow13): k += 1
      return k
    print([a(n) for n in range(63)]) # Michael S. Branicky, May 04 2021

A180138 Table, t, read by antidiagonals: t(b,e) is the smallest k such that k*b^e is a sum of two successive primes.

Original entry on oeis.org

5, 5, 4, 5, 4, 2, 5, 2, 2, 1, 5, 1, 7, 6, 7, 5, 2, 4, 2, 2, 4, 5, 6, 1, 10, 9, 10, 2, 5, 1, 18, 1, 2, 8, 20, 1, 5, 2, 2, 10, 4, 8, 2, 26, 9, 5, 3, 2, 15, 30, 12, 12, 25, 22, 15, 5, 18, 1, 20, 2, 18, 2, 12, 11, 10, 8, 5, 1, 6, 6, 22, 19, 4, 1, 36, 6, 16, 4, 5, 4, 1, 24, 6, 16, 6, 28, 4, 12, 10, 8, 2
Offset: 1

Views

Author

Keywords

Comments

1st row: A180130, 2nd row: A180131, 3rd row: bisection of A180130, 4th row: A180132, 5th row: A180133, 6th row: A180134, 7th row: trisection of A180130, 8th row: bisection of A180131, 9th row: A179975, 10th row: A180135, 11th row: A180136 and 12th row: A180137; 1st column: A010716.
The k-th term == 1 10, 12, 24, 30, 32, 36, 58, 68, 74, 81, 105, 155, 278, 303, 315, 331, 419, 437, 439, 632, 638, 752, 857, 863, 906, 924, 950, ..., .
Increasing terms: {5, 6, 10, 20, 26, 72, 104, 118, 306, 320, 348, 572, 824, 828, 972, 1054, 1110, 1540, 5, 7, 10, 18, 20, 26, 30, 36, 52, 66, 72, 120, 132, 168, 266, 574, 640, 776, 1600, 1938, 2616, 3124, 3306, 4440, ...,
which occurs at the k-th term: 5, 6, 10, 20, 26, 72, 104, 118, 306, 320, 348, 572, 824, 828, 972, 1054, 1110, 1540, 5, 7, 10, 18, 20, 26, 30, 36, 52, 66, 72, 120, 132, 168, 266, 574, 640, 776, 1600, 1938, 2616, 3124, 3306, 4440, 1, 13, 25, 31, 35, 44, 50, 75, 114, 117, 119, 166, 187, 267, 289, 615, 1416, 1575, 2069, 3463, 4840, 5968, 7709, 9695, ..., .
Increasing terms by antidiagonals: t(2,0)=5, t(4,2)=t(2,4)=7, t(5,3)=t(3,5)=10, t(3,6)=20, t(3,7)=26, t(7,4)=30, t(5,8)=36, t(3,13)=72, t(7,12)=120, t(5,15)=132, t(11,13)=168, t(13,12)=266, t(17,19)=574, t(17,37)=640, t(23,34)=776, t(13,52)=1600, t(25,59)=1938, t(13,86)=2616. t(29,81)=3124, t(43,82)=3306, t(37,103)=4440..., .
Corresponding primes are twin primes for t(18,2), t(24,2), t(54,6), t(60,5), t(72,6), t(102,8), t(114,1), t=(126,1), ..., .

Examples

			.\e..0...1...2...3...4...5...6...7...8...9..10..11..12..13..14..15..16..17..18..19..20..21..22..23..24..25
.b\
.2...5...4...2...1...7...4...2...1...9..15...8...4...2...1..25..19..11..12...6...3..10...5..35..33..52..26
.3...5...4...2...6...2..10..20..26..22..10..16...8...8..72..24...8..18...6...2...6...2..10..20..20..22..20
.4...5...2...7...2...9...8...2..25..11...6..10..35..52..13..14..15..19..47..13..84..21..35...9..23..49..52
.5...5...1...4..10...2...8..12..12..36..12..28..66..30...6..18.132..36.108..34..14..48..60..12..22.150..30
.6...5...2...1...1...4..12...2...1...4...3...5...8...7..34...8..11..33..26..13...9..13..90..15..40..30...5
.7...5...6..18..10..30..18...4..28...4..30..30..60.120..38..12...6..52.120..70..10.102..60..70..10.186.174
.8...5...1...2..15...2..19...6...5..52..28..15..45..13..42..35..46..49..26..24...3..18..15..21..62..32...4
.9...5...2...2..20..22..16...8..24..18...2...2..20..22..52.104..84..38.102.100..30.192..46..22..84.176..30
10...5...3...1...6...6...6..14...6...9..19..21..21..42..93..21...6..11...2..12.111..37..39..63..38..42..24
11...5..18...6..24...6..32..40..26..20..94..50..26..10.168..30..18.196.126..70.166..30..54.130..26..50..10
12...5...1...1...2..18...8..13...6...2..11..11..39..20..12...1...8...9..31.182..24...2.126.128..66...9..86
13...5...4..24...4...8..22..40...4..14..16..28..10.266..40..20..46.112.156..12..20.228..26...2.220..60.140
...
		

Crossrefs

Programs

  • Mathematica
    t[b_, e_] := Block[{k = 1, hnp = b^e/2}, While[ h = k*hnp; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Table[ t[b - e, e], {b, 2, 14}, {e, 0, b - 2}] // Flatten
    (* to find twins other than 2&3 *) gQ[b_, e_, k_] := Block[{h = k*b^e/2}, NextPrime@h - NextPrime[h, -1] < 3 ]; Do[ If[ gQ[b - e, e, k], Print[{b - e, e}]], {b, 2, 143}, {e, 0, b - 2}]
  • Python
    from sympy import isprime, nextprime, prevprime
    def sum2succ(n):
      if n <= 5: return n == 5
      return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
    def T(b, e):
      k, powb = 1, b**e
      while not sum2succ(k*powb): k += 1
      return k
    def atodiag(maxd): # maxd antidiagonals
      return [T(b-e, e) for b in range(2, maxd+2) for e in range(b-1)]
    print(atodiag(13)) # Michael S. Branicky, May 05 2021

A222618 Multiples of 10 that are sum of two consecutive primes.

Original entry on oeis.org

30, 60, 90, 100, 120, 210, 240, 300, 320, 330, 340, 360, 390, 410, 450, 480, 520, 540, 600, 630, 740, 810, 840, 930, 990, 1030, 1120, 1140, 1180, 1200, 1220, 1230, 1250, 1290, 1300, 1320, 1350, 1360, 1410, 1460, 1530, 1560, 1620, 1650, 1710, 1740, 1770, 1830
Offset: 1

Views

Author

Zak Seidov, Feb 26 2013

Keywords

Comments

a(1) = 30 = A179975(1)*10^1
a(4) = 100 = A179975(2)*10^2
a(123) = 6000 = A179975(3)*10^3
a(925) = 60000 = A179975(4)*10^4
a(7266) = 600000 = A179975(5)*10^5
a(204645) = 14000000 = A179975(6)*10^6.

Examples

			30 = 13 + 17, 60 = 29 + 31, 90 = 47 + 53, 100 = 47 + 53.
		

Crossrefs

Intersection of A001043 and A008592.
Cf. A179975 Least k => k*10^n is a sum of two successive primes.

Programs

  • Mathematica
    Select[(Total /@ Partition[Prime[Range[300]], 2, 1]), Mod[#, 10] < 1 &]
  • PARI
    p=13;forprime(q=17,1000,s=p+q;s%10<1&&print1(s", ");p=q)
Showing 1-10 of 10 results.