A262049 Sum of the palindromic primes dividing n (with repetition).
0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 0, 9, 8, 8, 0, 8, 0, 9, 10, 13, 0, 9, 10, 2, 9, 11, 0, 10, 0, 10, 14, 2, 12, 10, 0, 2, 3, 11, 0, 12, 0, 15, 11, 2, 0, 11, 14, 12, 3, 4, 0, 11, 16, 13, 3, 2, 0, 12, 0, 2, 13, 12, 5, 16, 0, 4, 3, 14, 0, 12, 0, 2, 13
Offset: 1
Programs
-
Maple
A262049 := proc(n) local a,d ; a := 0 ; for d in ifactors(n)[2] do if isA002113(op(1,d)) then a := a+op(1,d)*op(2,d) ; end if; end do: a ; end proc: seq(A262049(n),n=1..120) ;
-
Mathematica
palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; {0}~Join~ Table[Total@ Select[Flatten[Table[#1, {#2}] & @@@ FactorInteger@ n], palQ], {n, 2, 75}] (* Michael De Vlieger, Sep 09 2015 *) Join[{0},Table[Total[Times@@@Select[FactorInteger[n],PalindromeQ[#[[1]]]&]],{n,2,80}]] (* Harvey P. Dale, Sep 05 2022 *)
Comments