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.

A185641 Least k such that A098591(k) = n or 0 if no such k exists.

Original entry on oeis.org

360, 161, 139, 44, 655, 186, 178, 184, 83, 265, 296, 153, 17, 464, 405, 485, 271, 61, 452, 54, 199, 190, 230, 78, 224, 131, 82, 355, 122, 372, 10, 2689, 528, 72, 173, 277, 116, 331, 101, 207, 632, 303, 37, 58, 136, 35, 48, 181, 151, 390, 243, 118, 237, 973
Offset: 0

Views

Author

Michel Marcus, Jan 31 2013

Keywords

Comments

Phil Carmody observed "7 must divide at least one of the terms. That's why (apart from the excluded k=0 range) only <=7 of the 8 terms can be prime. If 7 divides 30*k+1, it also divides 30*k+1+4*7." (See sci.math link.)
a(n)=0 for n = 127, 254 and 255.
The maximum value for a(n) is obtained for a(247)=22621.

Examples

			a(0) = 360, because A098591(360) = 0 is the first occurrence of a 0 in A098591, indicating that there are no primes between 360*30 = 10800 and 10830, i.e., 10800 + {1,7,11,13,17,19,23,29} are composite.
		

Crossrefs

Cf. A098591.

Programs

  • Mathematica
    max = 10^5; A098591[n_] := Sum[ 2^k*Boole[ PrimeQ[ 30*n + {1, 7, 11, 13, 17, 19, 23, 29}[[k+1]] ] ], {k, 0, 7}]; a[n_] := Catch[ For[ k = 1, k <= max, k++, If[ A098591[k] == n, Throw[k], If[ k >= max, Throw[0]]]]]; Table[ Print[n, " ", an = a[n]]; an, {n, 0, 255}] (* Jean-François Alcover, Jan 31 2013 *)