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.

A277577 a(n) is the number of primes of the form (6n+3) +/- 3^k +/- 1, 1<=k<(t-2) and t is the number of digits of (6n+3)'s balanced ternary representation.

This page as a plain text file.
%I A277577 #15 Nov 20 2016 11:27:19
%S A277577 4,7,7,6,6,6,9,8,8,8,9,8,8,7,6,9,8,8,5,8,9,8,10,9,10,9,9,9,8,10,11,8,
%T A277577 10,7,6,8,8,11,9,7,8,9,8,10,9,10,8,7,5,8,10,6,10,5,5,10,7,9,9,9,8,12,
%U A277577 10,8,11,10,9,10,10,9,11,11,12,8,8,11,10,9,9,10,10,10,8,7,12,10,8,8,8,7,9,6,9,11,10,11,8,11,10,11,9,10,10,9,8,10,11,11,8,9,9
%N A277577 a(n) is the number of primes of the form (6n+3) +/- 3^k +/- 1, 1<=k<(t-2) and t is the number of digits of (6n+3)'s balanced ternary representation.
%C A277577 The first a few of a(n)=0 terms of this sequence appear on n=72030, 228439, 282059, 383424, 384204, 593477, 710787, 736541, 1057465, 1628226, 1831745, 1892512, 1922647, 2128995, 2244660, 2260650, 2276272, 2289706, 2374644, 2507484, 2633477, 2681747, 2695747, 2875824, 2889472, 2913659 up to n<=3000000.
%H A277577 Lei Zhou, <a href="/A277577/b277577.txt">Table of n, a(n) for n = 1..10000</a>
%e A277577 n=1: 6n+3=9. 9=(100)_bt. 1<=k<=(3-2)=1. When k=1, (6n+3)+/-3^1+/-1 = 5, 7, 11, 13, all primes. So a(1) = 4;
%e A277577 n=2: 6n+3=15. 15=(1TT0)_bt. 1<=k<=(4-2)=2. When k=1, (6n+3)+/-3^1+/-1 = 11, 13, 17, 19, all primes; when k=2, (6n+3)+/-3^2+/-1 = 5, 7, 23, 25, three primes.  Totals 7. So a(2) = 7.
%t A277577 BTDigits[m_Integer,g_] :=
%t A277577   Module[{n = m, d, sign, t = g},
%t A277577    If[n != 0, If[n > 0, sign = 1, sign = -1; n = -n];
%t A277577     d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++];
%t A277577     While[Length[t] < d, PrependTo[t, 0]];
%t A277577     t[[Length[t] + 1 - d]] = sign;
%t A277577     t = BTDigits[sign*(n - 3^(d - 1)), t]]; t];
%t A277577 Table[trib = 6*n + 3; t = BTDigits[trib,{}]; l = Length[t]; ct = 0;
%t A277577 Do[If[PrimeQ[trib - 3^j - 1], ct++];
%t A277577   If[PrimeQ[trib - 3^j + 1], ct++]; If[PrimeQ[trib + 3^j + 1], ct++];
%t A277577   If[PrimeQ[trib + 3^j - 1], ct++], {j, 1, l - 2}]; ct, {n, 1, 111}]
%Y A277577 Cf. A196698.
%K A277577 nonn,base
%O A277577 1,1
%A A277577 _Lei Zhou_, Oct 20 2016