OFFSET
1,1
COMMENTS
Sequence is 9 + 15 + 21 + 25 + 27 + 33 + ... + n.
LINKS
P. De Geest, Palindromic Sums
FORMULA
MAPLE
nextA071904 := proc(n) local a ; a := n + 2 - ((n+1) mod 2); while isprime(a) do a := a+2 ; od ; RETURN(a) ; end: isA002113 := proc(n) local drev, i ; drev := convert(n, base, 10) ; for i from 1 to nops(drev)/2 do if op(i, drev) <> op(-i, drev) then RETURN(false) ; fi ; od ; RETURN(true) ; end: nextA058844 := proc(n, nsum) local a, asum ; a := nextA071904(n) ; asum := nsum+a ; while not isA002113(asum) do a := nextA071904(a) ; asum := asum+a ; od ; RETURN([a, asum]) ; end: n := 9 ; nsum := 9 ; nnsum := [n, nsum] ; for i from 1 to 40 do print(op(1, nnsum)) ; nnsum := nextA058844(op(1, nnsum), op(2, nnsum)) ; od : # R. J. Mathar, Jan 29 2007
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Dec 15 2000
EXTENSIONS
a(20) from Donovan Johnson, Sep 01 2012
a(21)-a(23) from Chai Wah Wu, Dec 06 2019
STATUS
approved