cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A131260 a(n) is the least palindrome > a(n-1) such that a(1) + a(2) + ... + a(n) is a semiprime.

Original entry on oeis.org

4, 5, 6, 7, 11, 22, 66, 88, 202, 212, 242, 272, 404, 444, 464, 474, 595, 656, 707, 757, 777, 808, 828, 838, 868, 888, 969, 989, 1111, 1881, 2222, 2772, 3553, 4444, 5005, 5335, 5555, 5665, 5995, 6006, 6556, 6886, 8448, 8668, 8888, 9229, 9339, 10601
Offset: 1

Views

Author

Jonathan Vos Post, Oct 20 2007

Keywords

Comments

Semiprime analog of A051934. The semiprime partial sums begin 4, 9, 15, 22, 33, 55, 121, 209, 411, 623, 865, 1137, 1541, 1985, 2449, 2923, - R. J. Mathar, Nov 09 2007

Examples

			a(3) = 6 because that is the smallest palindrome p such that 4+5+p is a semiprime, namely 4+5+6 = 15 = 3*5.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true ; else false; fi ; end: isA002113 := proc(n) local i,digs ; if n < 10 then true; else digs := convert(n,base,10) ; for i from 1 to nops(digs) do if op(i,digs) <> op(-i,digs) then RETURN(false) ; fi ; od: RETURN(true) ; fi ; end: A131260 := proc(n) option remember ; local a,i ; if n = 1 then 4; else for a from A131260(n-1)+1 do if isA002113(a) and isA001358( a+add(A131260(i),i=1..n-1) ) then RETURN(a) ; fi ; od: fi ; end: seq(A131260(n),n=1..70) ; # R. J. Mathar, Nov 09 2007
  • Mathematica
    a = {4, 5}; Do[i = a[[ -1]] + 1; While[Not[FromDigits[Reverse[IntegerDigits[i]]] == i] || Not[Sum[FactorInteger[Plus @@ a + i][[j, 2]], {j, 1, Length[FactorInteger[ Plus @@ a + i]]}] == 2], i++ ]; AppendTo[a, i], {50}]; a (* Stefan Steinerberger, Nov 17 2007 *)

Extensions

Corrected and extended by R. J. Mathar and Stefan Steinerberger, Nov 09 2007