OFFSET
1,1
COMMENTS
a(2*n+1) = 2^(2*n+1)+1, n>0. - Vladeta Jovovic, Apr 02 2003
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
For n>2, a(n) = 2^n+1 unless this is a Fermat prime (A019434), in which case a(n) = 2^(n-1)*3+1 (which is divisible by 5). - Dean Hickerson, Apr 05 2003
MATHEMATICA
cno[n_]:=Module[{a=2^n+1}, If[PrimeQ[a], 2^(n-1)*3+1, a]]; Join[{4, 10}, Array[cno, 30, 3]] (* Harvey P. Dale, Mar 24 2012 *)
PROG
(Python)
from sympy import isprime
def A081547(n): return 10 if n==2 else ((3<<n-1)+1 if isprime(m:=(1<<n)+1) else m) # Chai Wah Wu, Sep 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 01 2003
EXTENSIONS
More terms from Vladeta Jovovic, Apr 02 2003
STATUS
approved