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.

A308950 Number of ways to write n as (p-1)/6 + 2^a*3^b, where p is a prime, and a and b are nonnegative integers.

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 4, 4, 5, 4, 5, 4, 6, 7, 6, 4, 5, 6, 9, 6, 6, 6, 5, 6, 7, 6, 7, 7, 10, 7, 6, 5, 8, 10, 8, 7, 8, 8, 11, 5, 10, 8, 8, 7, 6, 6, 6, 9, 10, 8, 6, 5, 10, 9, 8, 7, 9, 7, 11, 7, 8, 8, 7, 13, 10, 7, 10, 5, 10, 10, 10, 8, 8, 13, 9, 8, 8, 10, 11, 9, 8, 11, 8, 10, 10, 8, 8, 10, 9, 8, 8, 8, 10, 10, 8, 5, 11, 8, 15, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 02 2019

Keywords

Comments

Conjecture: Let r be 1 or -1. Then, any integer n > 1 can be written as (p-r)/6 + 2^a*3^b, where p is a prime, and a and b are nonnegative integers; in other words, 6*n+r can be written as p + 2^k*3^m, where p is a prime, and k and m are positive integers.
We have verified this for all n = 2..10^9.
Conjecture verified up to n = 10^11. - Giovanni Resta, Jul 03 2019

Examples

			a(2) = 1 since 2 = (7-1)/6 + 2^0*3^0 with 7 prime.
a(3) = 2 since 3 = (13-1)/6 + 2^0*3^0 = (7-1)/6 + 2^1*3^0 with 13 and 7 prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[6(n-2^a*3^b)+1],r=r+1],{a,0,Log[2,n]},{b,0,Log[3,n/2^a]}];tab=Append[tab,r],{n,1,100}];Print[tab]