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.

A261963 Smallest number that can be written as the sum of a Sophie Germain prime (A005384) and a practical number (A005153) in exactly n ways.

Original entry on oeis.org

2, 3, 6, 23, 31, 35, 65, 59, 95, 131, 173, 233, 203, 239, 257, 299, 317, 323, 473, 443, 635, 563, 671, 719, 809, 701, 779, 839, 803, 1109, 971, 1049, 1139, 1343, 1103, 1409, 1433, 1607, 1481, 1499, 1559, 1523, 1769, 1679, 1643, 2069, 2063, 2309, 2111, 2141
Offset: 0

Views

Author

Felix Fröhlich, Sep 06 2015

Keywords

Examples

			23 can be written as the sum of a Sophie Germain prime and a practical number in the following three ways: 3 + 20, 5 + 18, 11 + 12.
Since 23 is the smallest number that can be expressed like that in exactly three ways, a(3) = 23.
		

Crossrefs

Programs

  • PARI
    \\ First define the function is_a005153(n) as in A005153
    is_a005384(n) = ispseudoprime(n) && ispseudoprime(2*n+1)
    count(n) = x=1; y=n-1; i=0; while(y > n/2, if((is_a005153(x) && is_a005384(y)) || (is_a005153(y) && is_a005384(x)), i++); x++; y--); i
    a(n) = k=2; while(count(k)!=n, k++); k