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-2 of 2 results.

A276522 Zero terms of A276520.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 32, 52, 55, 61, 128, 194, 214, 244, 292, 334, 388, 782, 902, 992, 1414, 1571, 1712, 1916, 2551
Offset: 1

Views

Author

Lei Zhou, Nov 15 2016

Keywords

Comments

It is conjectured that this sequence is finite and all terms are found.

Examples

			A276520(1,2,3,4,5)=0, so a(1)=1, a(2)=2, a(3)=3, a(4)=4, and a(5)=5.
The next zero: A276520(7)=0, so a(6)=7.
		

Crossrefs

Cf. A276520.

Programs

  • Mathematica
    p = 3; sp = {p}; m = 0; Table[While[m++; l = Length[sp]; While[sp[[l]] < m, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; c = 2 - Mod[m + 1, 2]; ct = 0; Do[If[MemberQ[sp, m - c*sp[[i]]], If[c == 1, If[(2*sp[[i]]) <= m, ct++], ct++]], {i, 1, l}]; ct != 0]; m, {n, 1, 25}]

A278341 a(n) is the number of decompositions of n into unordered form p + c*q, where p, q are terms of A274987 and the difference of trits for p and q is no more than 1, c=1 for even n-s and c=2 for odd n-s.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 2, 1, 2, 2, 1, 2, 2, 1, 3, 2, 2, 2, 2, 0, 3, 2, 1, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 1, 1, 3, 0, 2, 2, 0, 0, 3, 0, 2, 1, 0, 1, 2, 0, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 2, 2, 0, 2
Offset: 1

Views

Author

Lei Zhou, Nov 18 2016

Keywords

Comments

p=q is allowed.
It is conjectured that this sequence has only 208 zero terms listed in sequence A278342.
This sequence is tested up to n=200000 without more zero terms.
a(n) <= A276520(n).

Examples

			A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109...}
For n=6, c=1, 6=3+3, 3=10 in balanced ternary(BT).  3 is a 2 trits BT number. 2-2=0<1, so this one counts, a(6)=1;
...
For n=20, c=1, 20=3+17=7+13.  For 3 and 17 pair, 3=10(BT), 17=1T0T(BT), the difference of trits of these two primes is 2. This does not count.  For 7 and 13 pair, 7=1T1(BT), 13=111(BT), the difference of trits of these two primes is 0.  This is counted.  So a(20)=1;
...
For n=29, c=2, 29=23+2*3=7+2*11=3+2*13.  For 23 and 3 pair, 23=10TT(BT), 3=10(BT), the difference of trits of these two primes is 2, this does not count; for 7 and 11 pair, 7=1T1(BT), 11=11T(BT), the difference of trits of these two primes is , this is counted; for  3 and 13 pair, 3=10(BT), 13=111(BT), the difference of trits of these two primes is 1, this is counted.  So a(29)=2.
		

Crossrefs

Programs

  • Mathematica
    p = 3; sp = {p}; Table[l = Length[sp]; While[sp[[l]] < n, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; c = 2 - Mod[n + 1, 2]; ct = 0; Do[If[MemberQ[sp, n - c*sp[[i]]], If[Abs[Floor[Log[3, 2*sp[[i]] - 1]] - Floor[Log[3, 2*(n - c*sp[[i]]) - 1]]] <= 1, If[c == 1, If[(2*sp[[i]]) <= n, ct++], ct++]]], {i, 1, l}];
    ct, {n, 1, 87}]
Showing 1-2 of 2 results.