login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058849 Sum of odd composites up to n is palindromic. 2

%I #16 Dec 06 2019 15:51:24

%S 9,55,99,215,357,663,3725,6321,26999,191363,675861,4073533,4180943,

%T 5540147,6531789,400974175,4248550291,6224149881,17109266357,

%U 38023877981,55995454633,62836534343,212955815417

%N Sum of odd composites up to n is palindromic.

%C Sequence is 9 + 15 + 21 + 25 + 27 + 33 + ... + n.

%H P. De Geest, <a href="http://www.worldofnumbers.com/firstpal.htm#sfn4">Palindromic Sums</a>

%F Sum_{i=1..j} A071904(i) = A002113(k) for A071904(j) = n and some k. - _R. J. Mathar_, Jan 29 2007

%p 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

%Y Cf. A058848, A058850.

%K nonn,base,more

%O 1,1

%A _Patrick De Geest_, Dec 15 2000

%E a(20) from _Donovan Johnson_, Sep 01 2012

%E a(21)-a(23) from _Chai Wah Wu_, Dec 06 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)