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.

Showing 1-3 of 3 results.

A104250 Sum of prime digits of n-th prime.

Original entry on oeis.org

2, 3, 5, 7, 0, 3, 7, 0, 5, 2, 3, 10, 0, 3, 7, 8, 5, 0, 7, 7, 10, 7, 3, 0, 7, 0, 3, 7, 0, 3, 9, 3, 10, 3, 0, 5, 12, 3, 7, 10, 7, 0, 0, 3, 7, 0, 2, 7, 11, 4, 8, 5, 2, 7, 14, 5, 2, 9, 16, 2, 5, 5, 10, 3, 6, 10, 6, 13, 10, 3, 11, 8, 10, 13, 10, 6, 3, 10, 0, 0, 0, 2, 3, 6, 3, 3, 0, 12, 0, 3, 7, 7, 7, 0, 0, 8, 5
Offset: 1

Views

Author

Zak Seidov, Feb 26 2005

Keywords

Examples

			a(6)=3 because sum of prime digits of Prime[6]=13 is 3.
		

Crossrefs

Sum of nonprime digits (1, 4, 6, 8, 9) of n-th prime: A104251. Primes A000040: sum of digits of primes: A007605.

Programs

  • Mathematica
    npd[n_]:=Total[Select[IntegerDigits[n],PrimeQ]]; Table[npd[p],{p,Prime[ Range[100]]}] (* Harvey P. Dale, Apr 24 2014 *)

Formula

a(n)=A007605(n)-A104251(n)

A104260 Sum of odd digits (1,3,5,7,9) of n-th prime.

Original entry on oeis.org

0, 3, 5, 7, 2, 4, 8, 10, 3, 9, 4, 10, 1, 3, 7, 8, 14, 1, 7, 8, 10, 16, 3, 9, 16, 2, 4, 8, 10, 5, 8, 5, 11, 13, 10, 7, 13, 4, 8, 11, 17, 2, 11, 13, 17, 19, 2, 3, 7, 9, 6, 12, 1, 6, 12, 3, 9, 8, 14, 1, 3, 12, 10, 5, 7, 11, 7, 13, 10, 12, 11, 17, 10, 13, 19, 6, 12, 19, 1, 9, 10, 1, 4, 6, 12, 3, 9, 12
Offset: 1

Views

Author

Zak Seidov, Feb 26 2005

Keywords

Crossrefs

Sum of even digits (2, 4, 6, 8) of n-th prime: A104261, sum of prime digits (2, 3, 5, 7) of n-th prime: A104250, sum of composite (nonprime) digits (1, 4, 6, 8, 9) of n-th prime: A104251, sum of digits of primes: A007605, primes: A000040.

Programs

  • Mathematica
    sodod={};Do[id=IntegerDigits[Prime[i]];lid=Length[id];sod=Sum[If[OddQ[id[[k]]], id[[k]], 0], {k, lid}];sodod={sodod, sod}, {i, 200}];sodod//Flatten
    f[n_] := Plus @@ Select[ IntegerDigits[ Prime[n]], OddQ[ # ] &]; Table[ f[n], {n, 88}] (* Robert G. Wilson v, Nov 03 2005 *)

Formula

a(n) = A007605(n) - A104261(n).

A104261 Sum of even digits (0,2,4,6,8) of n-th prime.

Original entry on oeis.org

2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 4, 4, 4, 0, 0, 6, 6, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 6, 6, 0, 0, 8, 0, 0, 0, 0, 2, 4, 4, 4, 2, 2, 6, 2, 2, 8, 8, 2, 2, 10, 10, 2, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 6, 0, 0, 8, 8, 0, 4, 4, 4, 6, 4, 4, 4, 8, 8, 4, 10, 10, 10, 4, 12, 4, 4, 0, 0, 2, 2, 4, 4, 0
Offset: 1

Views

Author

Zak Seidov, Feb 26 2005

Keywords

Crossrefs

Sum of odd digits (1, 3, 5, 7, 9) of n-th prime: A104260, sum of prime digits (2, 3, 5, 7) of n-th prime: A104250, sum of composite (nonprime) digits (1, 4, 6, 8, 9) of n-th prime: A104251, sum of digits of primes: A007605, primes: A000040.

Programs

  • Mathematica
    sodev={};Do[id=IntegerDigits[Prime[i]];lid=Length[id];sod=Sum[If[EvenQ[id[[k]]], id[[k]], 0], {k, lid}];sodev={sodev, sod}, {i, 200}];sodev//Flatten
    f[n_] := Plus @@ Select[ IntegerDigits[ Prime[n]], EvenQ[ # ] && # > 1 &]; Table[ f[n], {n, 102}] (* Robert G. Wilson v, Nov 03 2005 *)

Formula

A104261(n) = A007605(n) - A104260(n).
Showing 1-3 of 3 results.