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.

A095385 Numbers k with property that k is a peak value in 3x+1 trajectory such that both k+1 and k-1 are prime numbers.

Original entry on oeis.org

4, 72, 180, 192, 228, 240, 312, 600, 1092, 1152, 1428, 1488, 1608, 1620, 1872, 2088, 2112, 2592, 2688, 3000, 3168, 3252, 3360, 3528, 4272, 4548, 4800, 5640, 6552, 6960, 7488, 7560, 8088, 8292, 8388, 8820, 9000, 9012, 9240, 9768, 10008, 10068, 10272
Offset: 1

Views

Author

Labos Elemer, Jun 14 2004

Keywords

Comments

In such cases it seems that initial value equals peak value. Proof needed!

Examples

			k=72: list={72,36,18,9,28,14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1}
		

Crossrefs

Intersection of A014574 and A025586.

Programs

  • Mathematica
    c[x_]:=c[x]=(1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1);c[1]=1; fpl[x_]:=FixedPointList[c, x]; {$RecursionLimit=1000;m=0}; Do[If[PrimeQ[1+Max[fpl[n]]]&&PrimeQ[ -1+Max[fpl[n]]], Print[n]], {n, 1, 10000}]