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.

A329147 Replace in n each nonzero digit d with prime(d).

This page as a plain text file.
%I A329147 #71 Apr 10 2023 10:50:46
%S A329147 0,2,3,5,7,11,13,17,19,23,20,22,23,25,27,211,213,217,219,223,30,32,33,
%T A329147 35,37,311,313,317,319,323,50,52,53,55,57,511,513,517,519,523,70,72,
%U A329147 73,75,77,711,713,717,719,723,110,112,113,115,117,1111,1113,1117,1119,1123
%N A329147 Replace in n each nonzero digit d with prime(d).
%C A329147 Some properties:
%C A329147 No term has a digit 4, 6 or 8.
%C A329147 No term begins with 9, 10, 12, 15, 29, 39, 59, 79.
%C A329147 If a is regarded as a function a: n --> a(n) from N to N, then
%C A329147 1) a is neither increasing: a(9) > a(10) nor decreasing: a(3) < a(4),
%C A329147 2) a is not injective: a(92) = a(122) = 233,
%C A329147 3) a is not surjective: 4 and 15 are not terms. The integers that are not in this sequence are in A329149 and the integers that are obtained are in A329150, with increasing order.
%C A329147 Some primes remain primes: 2, 3, 5, 7, 19, 59, ...
%C A329147 Some primes become composites: 11, 13, 17, 23, 29, 31, ...
%C A329147 Some composites remain composites: 10, 14, 16, 18, 20, 21, 22,...
%C A329147 Some composites become primes: 4, 6, 8, 9, 12, 15, 24, 25, 26,...
%C A329147 When n > 4 ends respectively with 0, 1 or 3 then a(n) that ends with 0, 2, 5 is composite.
%C A329147 The sequence 9, 99, 999, ..., respectively 12, 1212, 121212, ... generates the same numbers 23, 2323, 232323, ... Analogously, 9, 92, 922, 922, ... and 12, 122, 1222, ... generate the same sequence 23, 233, 2333, 23333, .... For the numbers 91,9191,919191, ... the terms of the sequence are 232, 232232, 232232232, ... so palindromes. - _Marius A. Burtea_, Nov 07 2019
%C A329147 The numbers 113, 14113, 1441113, 144411113, ... determine the terms 225 = 15^2, 27225 = 165^2, 2772225 = 1665^2, ... (in A191486). The numbers 14, 14000, 14000000, ... determine the terms 27 = 3^3, 27000 = 30^3, 27000000 = 300^3, .... - _Marius A. Burtea_, Nov 12 2019
%H A329147 Metin Sariyar, <a href="/A329147/b329147.txt">Table of n, a(n) for n = 0..10000</a>
%e A329147 As a(2) = prime(2) = 3, a(5) = prime(5) = 11 and a(8) = prime(8) = 19, a(258)= 31119.
%e A329147 As a(3) = prime(3) = 5, a(0) = 0 and a(7) = prime(7) = 17, hence a(307) = 5017.
%p A329147 a:= n-> (l-> parse(cat(seq(`if`(l[-i]=0, 0, ithprime(l[-i])),
%p A329147              i=1..nops(l)))))(convert(n, base, 10)):
%p A329147 seq(a(n), n=0..80);  # _Alois P. Heinz_, Nov 07 2019
%t A329147 p[n_] := If[n > 0, Prime[n], 0]; a[n_] := FromDigits[Flatten @ IntegerDigits @ (p /@ IntegerDigits[n])]; Array[a, 60, 0] (* _Amiram Eldar_, Nov 06 2019 *)
%o A329147 (Magma) v:=[0,2,3,5,7,11,13,17,19,23]; [0] cat [StringToInteger(&cat[IntegerToString(k): k in Reverse([v[m+1]: m in Intseq(n)])]): n in [1..60]]; // _Marius A. Burtea_, Nov 07 2019
%o A329147 (PARI) a(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0) \\ _Rémy Sigrist_, Nov 07 2019
%o A329147 (Python)
%o A329147 def A329147(n): return int("".join(map(str, ([0, 2, 3, 5, 7, 11, 13, 17, 19, 23][int(i)] for i in str(n)))))
%o A329147 print([A329147(n) for n in range(60)]) # _Michael S. Branicky_, Apr 10 2023
%Y A329147 Cf. A000040, A329149, A329150.
%Y A329147 Similar to A048380, A048385 and A322131.
%K A329147 nonn,base
%O A329147 0,2
%A A329147 _Bernard Schott_, Nov 06 2019