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.

User: Sam Mathers

Sam Mathers's wiki page.

Sam Mathers has authored 3 sequences.

A243097 Digit sums of the nontrivial reversal numbers (numbers which are integer multiples of their reversal), excluding palindromes and multiples of 10.

Original entry on oeis.org

18, 18, 27, 27, 36, 36, 45, 45, 36, 54, 36, 54, 36, 63, 36, 63, 36, 54, 72, 36, 54, 72, 36, 54, 81, 36, 54, 81, 36, 54, 54, 72, 90, 36, 54, 54, 72, 90, 36, 63, 54, 72, 99, 36, 63, 54, 72, 99, 36, 54, 72, 54, 72, 72, 90, 108, 36, 54, 72, 54, 72, 72, 90, 108
Offset: 1

Author

Sam Mathers, Aug 18 2014

Keywords

Examples

			a(1)=digit sum of 8712=8+7+1+2=18, a(3)=digit sum of 87912=8+7+9+1+2=27.
		

Crossrefs

Cf. A007953 (digit sum), A031877 (union of A222814 and A222815).

Programs

  • Python
    A243097 = []
    for n in range(1,10**7):
        if n % 10:
            s1 = str(n)
            s2 = s1[::-1]
            if s1 != s2 and not n % int(s2):
                A243097.append(sum(int(d) for d in s1))
    # Chai Wah Wu, Sep 05 2014

Formula

a(n) = 9(d-2p-b) where d is the number of digits in the reversal number, p is the number of repeating units of either 8712 or 9801 (they can be split in the middle of the sequence as long as all 4 numbers appear in the correct order), and b is the number of digits separating two complete "units" (must appear between two complete units and not in between 1 incomplete unit).
a(n) = A007953(A031877(n)).

Extensions

More terms from Michel Marcus, Aug 25 2014

A242757 Partial sums of the number of integers between successive twin prime pairs.

Original entry on oeis.org

0, 3, 6, 15, 24, 39, 48, 75, 78, 105, 114, 141, 150, 153, 180, 189, 216, 225, 252, 285, 354, 363, 390, 447, 492, 519, 534, 555, 570, 717, 726, 729, 756, 777, 912, 921, 936, 945, 972, 1029, 1104, 1149, 1158, 1167
Offset: 1

Author

Sam Mathers, Aug 16 2014

Keywords

Comments

a(n) is the partial sum of the number of integers separating each successive pair of twin prime numbers less than and up to the n-th pair of twin primes.

Examples

			For n=4, a(4)=15 because the number of integers separating the first 4 pairs of twin prime numbers are as follows, 0 between (3,5) and (5,7), 3 between (5,7) and (11,13), 3 between (11,13) and (17,19), and 9 between (17,19) and (29,31). 0+3+3+9=15 so a(4)=15.
		

Crossrefs

Cf. A001359, A006512. Partial sums of A204099.

Programs

  • PARI
    s=0; q=2; forprime(p=5, 10^4, if(isprime(p+2), s=s+p-q-3; print1(s", "); q=p)) \\ Jens Kruse Andersen, Aug 17 2014

Formula

a(n) = A001359(n+1) - 2 - 3*n. - Robert Israel, Aug 17 2014

A242398 Partial sums of the number of primes separating successive pairs of twin primes.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 5, 9, 9, 12, 12, 16, 16, 16, 18, 19, 22, 23, 25, 28, 38, 38, 42, 49, 53, 56, 58, 59, 61, 79, 79, 79, 81, 83, 100, 100, 101, 101, 103, 109, 118, 121, 122, 123, 124, 132, 135, 137, 137, 152, 153, 157, 158, 159, 166, 173, 173, 177, 177, 181, 184, 188, 188, 189, 189, 190, 197, 199, 204, 205, 210
Offset: 1

Author

Sam Mathers, Aug 16 2014

Keywords

Comments

a(n) is the number of primes that are not twin primes greater than the first twin prime pair (3,5) and less than the (n+1)th twin prime pair. All primes, other than two either exist in one of the twin prime pairs or are counted in the sum. Two is not included because it occurs before the first twin prime pair.

Examples

			For n=4, a(4)=1. We can get this by writing the first n+1 twin prime pairs and taking the sum of the primes in between them. The pairs are (3,5),(5,7),(11,13),(17,19),(29,31). The only prime between these pairs is 23, thus the answer is one.
		

Crossrefs

Partial sum of A048614.

Programs

  • PARI
    s=0; forprime(p=5, 10^4, if(isprime(p+2), print1(s", "); s--, s++)) \\ Jens Kruse Andersen, Aug 17 2014