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

A113580 Define prime(0) = 1; then a(n) = sum prime(d), where d ranges over the decimal digits of n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 3, 4, 5, 7, 9, 13, 15, 19, 21, 25, 4, 5, 6, 8, 10, 14, 16, 20, 22, 26, 6, 7, 8, 10, 12, 16, 18, 22, 24, 28, 8, 9, 10, 12, 14, 18, 20, 24, 26, 30, 12, 13, 14, 16, 18, 22, 24, 28, 30, 34, 14, 15, 16, 18, 20, 24, 26, 30, 32, 36, 18, 19, 20, 22, 24, 28
Offset: 0

Views

Author

Amarnath Murthy, Nov 06 2005

Keywords

Examples

			a(123) = prime(1) + prime(2) + prime(3) = 2 + 3 + 5 = 10.
a(10001) = 2 + 1 + 1 + 1 + 2 = 7.
		

Crossrefs

Cf. A113581; first occurrence in A113736.

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n] /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}); Table[ f[n], {n, 0, 75}] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Nov 08 2005

A160040 Numbers n such that pi(n) = prime(d_1)*prime(d_2)* ... *prime(d_k), where d_1, d_2, ... d_k is the decimal expansion of n, and the zeroth prime is 1.

Original entry on oeis.org

123, 2407, 5224, 8350, 11166, 30843, 51174, 66026, 172451, 202774, 266109, 546322, 1082682, 1830188, 1882036, 2754207, 3351809, 14355351, 23539612, 23539621, 24322837, 63950931, 122924349, 161485470, 204868903, 204868930, 252704792
Offset: 1

Views

Author

Robert G. Wilson v, Apr 30 2009

Keywords

Comments

See the references in A008578 for a discussion concerning the zeroth prime.

Crossrefs

Cf. A008578, A113581. A098683 is a proper subset.

Programs

  • Mathematica
    c = 0; k = 1; lst = {}; fQ[n_] := ( c == Times @@ (IntegerDigits@ n /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}) ); While[k < 6000000000, If[PrimeQ@k, c++, If[ fQ@k, AppendTo[lst, k]; Print@k]]; k++ ]; lst

A290675 For a given n, the nonzero digits of n are the prime indices for the factorization of n.

Original entry on oeis.org

14, 154, 1196, 66079, 279174, 302768895, 2249805789
Offset: 1

Views

Author

Charles Ronco, Aug 08 2017

Keywords

Comments

a(8) > 10^35, if it exists. - Giovanni Resta, Aug 09 2017
a(n) != 1 mod 10. a(8) > 10^44, if it exists. - Chai Wah Wu, Aug 10 2017
Fixed points of A113581. - Alois P. Heinz, May 11 2023

Examples

			14 = 2*7, which are the 1st and 4th primes. 154 = 2*11*7 which are the 1st, 5th, and 4th primes, respectively. So use the digits of n (excluding zero) to find the corresponding primes, and the product of those primes equals n.
		

Crossrefs

Supersequence of A097227.
Cf. A113581.

Programs

  • Mathematica
    x = 10^7; (* this number is the upper end of the search *) Do[If[n == Times @@ Prime /@ DeleteCases[RealDigits[n][[1]], 0], Print[n]], {n, x}] (* or *)
    up = 3*^9; ric[n_, e_, k_] := Block[{m=n, j=0}, If[k == 10, If[Most@ DigitCount[n] == e, Print@n; Sow@n], While[m < up, ric[m, Append[e, j], k+1]; j++; m *= Prime[k] ]]]; Sort@ Reap[ric[1, {}, 1]][[2, 1]] (* faster, Giovanni Resta, Aug 09 2017 *)
  • PARI
    is(n) = my(d=digits(n), prd=1); for(k=1, #d, if(d[k]!=0, prd=prd*prime(d[k]))); prd==n \\ Felix Fröhlich, Aug 09 2017
    
  • Python
    from functools import reduce
    from operator import mul
    from itertools import combinations_with_replacement
    A290675_list, lmax, ptuple = [], 12, (2,3,5,7,11,13,17,19,23)
    for l in range(1,lmax+1):
        for d in combinations_with_replacement(range(1,10),l):
            n = reduce(mul,(ptuple[i-1] for i in d))
            if n < 10**lmax and tuple(sorted((int(x) for x in str(n) if x != '0'))) == d:
                A290675_list.append(n) # Chai Wah Wu, Aug 10 2017

Extensions

a(6)-a(7) from Giovanni Resta, Aug 09 2017

A359802 a(n) = product prime(d + 1), where d ranges over all the decimal digits of n.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 6, 9, 15, 21, 33, 39, 51, 57, 69, 87, 10, 15, 25, 35, 55, 65, 85, 95, 115, 145, 14, 21, 35, 49, 77, 91, 119, 133, 161, 203, 22, 33, 55, 77, 121, 143, 187, 209, 253, 319, 26, 39, 65, 91, 143, 169, 221, 247, 299, 377, 34, 51
Offset: 0

Views

Author

Fabian I. Garcia, May 11 2023

Keywords

Examples

			a(0) = prime(0+1) = prime(1) = 2.
a(5) = prime(5+1) = prime(6) = 13.
a(20) = prime(2+1) * prime(0+1) = prime(3) * prime(1) = 5 * 2 = 10.
		

Crossrefs

Very similar to A113581.
Fixed points are in A115078.

Programs

  • Maple
    a:= n-> mul(ithprime(d+1), d=convert(n, base, 10)):
    seq(a(n), n=0..171);  # Alois P. Heinz, May 11 2023
  • PARI
    a(n) = my(d=digits(n)); if (n==0, d=[0]); prod(k=1, #d, prime(d[k]+1)); \\ Michel Marcus, May 12 2023
  • Python
    def a(n):
        primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29)
        product = 1
        for d in str(n):
            product *= primes[int(d)]
        return product
    

A113735 Let prime(0) = 1 and f(n) = product prime(d), where d ranges over all the decimal digits of n. The sequence gives numbers n such that f(n) == 0 (mod n).

Original entry on oeis.org

1, 14, 17, 154, 1196, 26979, 66079, 279174, 1698619, 9397685, 302768895, 594963655, 2249805789, 6794867989, 9785759929, 75077778589, 67471872963495, 34976979277935695, 275776822479793635, 459267544887917766, 34678475798796583278525
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A113581. Superset of A097227.

Programs

  • Mathematica
    f[n_] := Times @@ (IntegerDigits[n] /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}); Do[ If[ Mod[ f[n], n] == 0, Print[n]], {n, 10^8}]

Extensions

a(11)-a(16) from Giovanni Resta, Aug 09 2017
a(17)-a(21) from Chai Wah Wu, May 07 2019

A113736 Let prime(0) = 1 and f(i) = sum prime(d), where d ranges over all the decimal digits of i. The sequence specifies the smallest i such that f(i) = n.

Original entry on oeis.org

0, 1, 2, 11, 3, 22, 4, 23, 14, 24, 5, 34, 6, 25, 16, 26, 7, 36, 8, 27, 18, 28, 9, 38, 19, 29, 119, 39, 229, 49, 239, 68, 249, 59, 268, 69, 259, 88, 269, 79, 288, 89, 279, 189, 289, 99, 389, 199, 299, 1199, 399, 2299, 499, 2399, 689, 2499, 599, 2689, 699, 2599, 889, 2699
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A113581.

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n] /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}); t = Table[0, {100}]; Do[a = f[n]; If[a < 101 && t[[a]] == 0, t[[f[n]]] = n], {n, 5000}]; t
Showing 1-6 of 6 results.