OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..100
FORMULA
Let p(n) = floor(phi^(n/log(n))), g(n) = p(n) if (p(n) mod 2) = 0, otherwise g(n) = 0, and f(n) = f(n-1) + g(n) with f(1) = 2, f(2) = 3. Define b(n) as f(n) if f(n) is prime, then a(n) is the list of b(n) with duplicates removed.
MATHEMATICA
p[n_]:= Floor[GoldenRatio^(n/Log[n])];
g[n_]:= g[n]= If[Mod[p[n], 2]==0, p[n], 0];
f[n_]:= f[n]= If[n<3, n+1, f[n-1] +g[n]];
DeleteDuplicates[Table[If[PrimeQ[f[n]], f[n], {}], {n, 1000}]]//Flatten
PROG
(SageMath)
def p(n): return floor(golden_ratio^(n/log(n)))
def g(n): return p(n) if (p(n)%2)==0 else 0
@CachedFunction
def f(n): return n+1 if (n<3) else f(n-1) + g(n)
def b(n): return f(n) if is_prime(f(n)) else {}
set([f(n) for n in range(1, 1001) if is_prime(f(n))]) # G. C. Greubel, Aug 09 2023
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Feb 08 2006
EXTENSIONS
Edited by G. C. Greubel, Aug 09 2023
STATUS
approved
