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-2 of 2 results.

A039992 Number of distinct primes embedded in prime p(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 3, 1, 3, 2, 3, 4, 1, 2, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 3, 2, 4, 5, 2, 7, 6, 7, 11, 6, 6, 3, 7, 7, 8, 11, 10, 3, 4, 6, 10, 4, 3, 4, 3, 3, 4, 6, 4, 4, 4, 4, 3, 6, 4, 3, 6, 6, 5, 7, 5, 11, 5, 7, 8, 4, 4, 7, 7, 7, 10, 3, 6, 10, 2, 1, 6, 4, 6, 3, 4, 3, 1, 5, 4, 4, 5, 6, 3, 6, 1, 4, 3, 4, 6, 3, 5
Offset: 1

Views

Author

Keywords

Comments

a(n) counts permuted subsequences of digits of p(n) which denote primes.
We put all the digits of prime(n) into a bag and ask how many distinct primes can be formed using some or all of these digits.

Examples

			a(35)=6 because from the digits of p(35)=149, six numbers can be formed, 19, 41, 149, 419, 491 & 941, which are primes.
		

Crossrefs

a(n) = A045719(n)+1 = A039993(p(n)) A101988 gives another version.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; f[n_] := Length[ Union[ Select[ FromDigits /@ Flatten[ Permutations /@ Subsets[ IntegerDigits[ Prime[n]]], 1], PrimeQ]]]; Table[f[n], {n, 102}] (* Ray Chandler and Robert G. Wilson v, Feb 25 2005 *)

A101988 Number of primes (with repetition) that can be formed from digits of the n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 3, 1, 3, 2, 3, 4, 1, 2, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 3, 3, 7, 8, 3, 9, 6, 9, 11, 6, 6, 3, 7, 7, 8, 11, 10, 3, 5, 6, 10, 5, 3, 6, 4, 5, 6, 6, 4, 4, 4, 4, 3, 6, 5, 3, 6, 6, 9, 9, 8, 11, 8, 10, 8, 4, 6, 7, 7, 10, 10, 5, 6, 10, 3, 1, 6, 4, 6, 5, 4, 4, 1, 5, 4, 4, 5, 6, 3, 6, 1, 7, 5, 4, 6, 3, 5, 4
Offset: 1

Views

Author

Zak Seidov, Jan 29 2005

Keywords

Comments

Here we put all the digits of prime(n) into a bag and ask how many not necessarily distinct primes can be formed using some or all of these digits.

Examples

			a(35)=6 because from the digits of p(35)=149, six numbers can be formed, 19, 41, 149, 419, 491 & 941, which are primes.
		

Crossrefs

Programs

  • Mathematica
    (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Length[ Select[ FromDigits /@ Flatten[ Permutations /@ Subsets[ IntegerDigits[ Prime[n]]], 1], PrimeQ[ # ] &] ]; Table[ f[n], {n, 102}] (* Robert G. Wilson v, Feb 10 2005 *)

Extensions

Corrected and extended by Robert G. Wilson v, Feb 10 2005
Definition clarified by Ray Chandler, Mar 01 2005
Showing 1-2 of 2 results.