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.

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

This page as a plain text file.
%I A180134 #10 May 06 2021 22:10:44
%S A180134 5,6,18,10,30,18,4,28,4,30,30,60,120,38,12,6,52,120,70,10,102,60,70,
%T A180134 10,186,174,42,6,90,146,154,22,18,140,20,168,24,240,60,80,26,286,154,
%U A180134 22,12,196,28,4,2,128,116,156,422,130,204,84,12,118,88,240,536,564,798,114
%N A180134 Smallest k such that k*7^n is a sum of two successive primes.
%C A180134 If a(n) == 0 (mod 7), then a(n+1) = a(n)/7.
%C A180134 Records: 5, 6, 18, 30, 60, 120, 186, 240, 286, 422, 536, 564, 798, 1010, 1074, 1334, 1434, 1474, 3706, 4108, 4370, 6160, ..., .
%C A180134 Corresponding prime are twin primes for n = 0, 17, 369, ..., .
%H A180134 Robert G. Wilson v, <a href="/A180134/b180134.txt">Table of n, a(n) for n = 0..400</a>
%t A180134 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]
%o A180134 (Python)
%o A180134 from sympy import isprime, nextprime, prevprime
%o A180134 def ok(n):
%o A180134   if n <= 5: return n == 5
%o A180134   return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
%o A180134 def a(n):
%o A180134   k, pow7 = 1, 7**n
%o A180134   while not ok(k*pow7): k += 1
%o A180134   return k
%o A180134 print([a(n) for n in range(64)]) # _Michael S. Branicky_, May 06 2021
%Y A180134 Cf. A180130, A180131, A180132, A180133, A179975, A180135, A180136, A180137, A180138.
%K A180134 nonn
%O A180134 0,1
%A A180134 _Zak Seidov_ & _Robert G. Wilson v_, Aug 15 2010