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.

A215946 Smallest prime q such that q + prime(n) is power of 6 or 0 if no such q exists.

Original entry on oeis.org

0, 3, 31, 29, 0, 23, 19, 17, 13, 7, 0, 179, 0, 173, 1249, 163, 157, 0, 149, 0, 1223, 137, 1213, 127, 46559, 0, 113, 109, 107, 103, 89, 0, 79, 78364163957, 67, 0, 59, 53, 1129, 43, 37, 0, 0, 23, 19, 17, 0, 60465953, 1069, 7547, 1063, 7537, 0, 0, 1039, 1033
Offset: 1

Views

Author

Zak Seidov, Aug 28 2012

Keywords

Comments

Such q certainly do not exist if p == 1 (mod 10).
Corresponding exponents of 6 (0 if a(n)=0): 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 3, 0, 3, 4, 3, 3, 0.

Examples

			n=2: 3+3=6^1, n=3: 5+31=6^2, n=4: 7+29=6^2, n=6: 13+23=6^2.
		

Crossrefs

Cf. A191474.

Programs

  • Mathematica
    s={0,3}; Do[p=Prime[n]; If[Mod[p,10]<2, AppendTo[s,0]; Goto[ne]]; m=Ceiling[Log[6,p]]; While[!PrimeQ[q=6^m-p], m++]; AppendTo[s,q]; Label[ne], {n, 3, 162}]; s

A382035 a(n) is the smallest prime q such that q + prime(n) is of form 10^k or 2*10^k, or 0 if no such prime exists.

Original entry on oeis.org

0, 7, 5, 3, 89, 7, 3, 181, 977, 71, 1999969, 163, 59, 157, 53, 47, 41, 139, 1933, 29, 127, 199921, 17, 11, 3, 999999999899, 97, 999999893, 19891, 887, 73, 9999999999999999999869, 863, 61, 9851, 1999999999849, 43, 37, 9833, 827, 821, 19, 809, 7, 3, 1801, 1789
Offset: 1

Views

Author

Steven Lu, Mar 12 2025

Keywords

Comments

a(1) is not the only term equal to 0.
For example, a(37145)=0, since prime(37145)=442609, and:
10^k - 442609 is a multiple of 3, for k>=6,
2*10^(2*k) - 442609 is a multiple of 11, for k>=3,
2*10^(6*k+1) - 442609 is a multiple of 7, for k>=1,
2*10^(6*k+3) - 442609 is a multiple of 13, for k>=1,
2*10^(6*k+5) - 442609 is a multiple of 37, for k>=1.

Examples

			For n=11 (prime(n)=31):
For all positive integer k, 10^k-31 is multiple of 3.
200 - 31 = 169 = 13 * 13
2000 - 31 = 1969 = 11 * 179
20000 - 31 = 19969 = 19 * 1051
200000 - 31 = 199969 = 7 * 7 * 7 * 11 * 53
2000000 - 31 = 1999969 is a prime number.
thus a(11) = 1999969.
		

Crossrefs

Cf. A191474 (base 2 version of this sequence).

Programs

  • Mathematica
    Table[If[MissingQ[#], 0, # - Prime[i]] &@SelectFirst[Flatten[Table[{10^j, 2 10^j}, {j, 100}]], # > Prime[i] && PrimeQ[# - Prime[i]] &], {i, 1, 47}]
Showing 1-2 of 2 results.