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.

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

This page as a plain text file.
%I A180133 #11 May 06 2021 21:20:21
%S A180133 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,
%T A180133 69,38,27,79,47,9,36,6,1,92,44,51,50,16,81,21,9,50,84,14,45,59,124,
%U A180133 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
%N A180133 Smallest k such that k*6^n is a sum of two successive primes.
%C A180133 If a(n) == 0 (mod 6), then a(n+1) = a(n)/6.
%C A180133 Records: 5, 12, 34, 90, 92, 124, 215, 249, 592, 601, 1099, 1282, 1406, 1589, 1700, 2688, ..., .
%C A180133 Corresponding primes are twin primes for n = 0, 1, 2, 3, 4, 7, 13, 15, 28, 69, 120, 162, 251, 257, 279 ..., .
%H A180133 Robert G. Wilson v, <a href="/A180133/b180133.txt">Table of n, a(n) for n = 0..500</a>
%t A180133 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]
%o A180133 (Python)
%o A180133 from sympy import nextprime, prevprime
%o A180133 def sum2succ(n): return n == prevprime(n//2) + nextprime(n//2)
%o A180133 def a(n):
%o A180133   if n == 0: return 5
%o A180133   k, pow6 = 1, 6**n
%o A180133   while not sum2succ(k*pow6): k += 1
%o A180133   return k
%o A180133 print([a(n) for n in range(77)]) # _Michael S. Branicky_, May 02 2021
%Y A180133 Cf. A180130, A180131, A180132, A180134, A179975, A180135, A180136, A180137, A180138.
%K A180133 nonn
%O A180133 0,1
%A A180133 _Zak Seidov_ & _Robert G. Wilson v_, Aug 15 2010