A135682 a(n)=n if n=1 or if n=prime. Otherwise, n=4 if n is even and n=7 if n is odd.
1, 2, 3, 4, 5, 4, 7, 4, 7, 4, 11, 4, 13, 4, 7, 4, 17, 4, 19, 4, 7, 4, 23, 4, 7, 4, 7, 4, 29, 4, 31, 4, 7, 4, 7, 4, 37, 4, 7, 4, 41, 4, 43, 4, 7, 4, 47, 4, 7, 4, 7, 4, 53, 4, 7, 4, 7, 4, 59, 4, 61, 4, 7, 4, 7, 4, 67, 4, 7, 4, 71, 4, 73
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Mathematica
a[n_] := If[PrimeQ[n] || n == 1, n, If[EvenQ[n], 4, 7] ]; Table[a[n], {n,1,25}] (* G. C. Greubel, Oct 26 2016 *)