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

A361750 Terms of A329150 that have several preimages.

Original entry on oeis.org

23, 223, 230, 232, 233, 235, 237, 323, 523, 723, 1123, 1323, 1723, 1923, 2023, 2223, 2230, 2232, 2233, 2235, 2237, 2300, 2302, 2303, 2305, 2307, 2311, 2313, 2317, 2319, 2320, 2322, 2323, 2325, 2327, 2330, 2332, 2333, 2335, 2337, 2350, 2352, 2353, 2355, 2357, 2370, 2372, 2373, 2375, 2377
Offset: 1

Views

Author

Bernard Schott, Mar 23 2023

Keywords

Comments

From k = 1 to 9, A329147(k) has more than one preimage only for k = 9 since A329147(9) = A329147(12) = 23; so, all terms of this sequence have in their decimal expansion the two-digit integer '23'; it follows that when || denotes concatenation, the terms of this sequence are of the form:
X||23 as 223, 323, 523, 723, 1123, 1323, 1723, 1923, 2023, 2223, ... or,
23||Y as 230, 232, 233, 235, 237, 2300, 2302, 2303, 2305, 2307, 2311, ... or,
X||23||Y as 2230, 2232, 2233, 2235, 2237, 3230, 3232, 3233, ...
Every term of this sequence has 2^q preimages, and the smallest terms with exactly 2^q preimages for q >= 1 are 23, 2323, 232323, ... with q times the 2-digit number 23 in its decimal expansion; hence, the 8 preimages of 232323 are 999, 9912, 9129, 91212, 1299, 12912, 12129 and 121212.

Examples

			One example for each type:
23||2 = 232 = A329147(91) = A329147(121).
7||23 = 723 = A329147(49) = A329147(412).
2||23||5 = 2235 = A329147(193) = A329147(1123).
23||23 = 2323 = A329147(99) = A329147(129) = A329147(1212) = A329147(912).
		

Crossrefs

Programs

  • Mathematica
    p[n_] := If[n > 0, Prime[n], 0]; seq[ndigmax_] := Module[{t = Table[FromDigits[ Flatten @ IntegerDigits @ (p /@ IntegerDigits[n]) ], {n, 1, 10^ndigmax - 1}]}, Sort @ Select[Tally[t], First[#] < 10^ndigmax && Last[#] > 1 &][[;; , 1]]]; seq[4] (* Amiram Eldar, Mar 23 2023 *)
  • PARI
    f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147
    lista(nn) = {my(map = Map()); for (n=1, nn, my(m = f(n)); if (mapisdefined(map, m), mapput(map, m, 1+mapget(map, m)), mapput(map, m, 0));); my(list = List()); for (n=1, nn, if (mapisdefined(map, n), my(v = mapget(map, n)); if (#v > 0, listput(list, n)););); Vec(list);} \\ Michel Marcus, Mar 24 2023

A361821 Perfect powers in A329150.

Original entry on oeis.org

25, 27, 32, 225, 2025, 2197, 2500, 3025, 3375, 7225, 11025, 13225, 21952, 22500, 27000, 27225, 55225, 70225, 112225, 133225, 172225, 195112, 202500, 207025, 235225, 250000, 255025, 302500, 319225, 511225, 555025, 570025, 722500, 1102500, 1113025, 1177225, 1311025
Offset: 1

Views

Author

Bernard Schott, Mar 25 2023

Keywords

Comments

No term has a digit 4, 6 or 8.
Subsequences of squares are listed in Crossrefs.

Examples

			32 is a term since A329147(21) = 32 = 2^5.
2197 is a term since A329147(194) = 2197 = 13^3.
235225 is a term since A329147(123113) = 235225 = 485^2.
		

Crossrefs

Intersection of A001597 and A329150.
Cf. A329147.
Subsequences of squares with specified digits: A058426 (0,2,5), A053919 (2,3,5), A030485 (2,5,7), A191486 (2,3,5,7).

Programs

  • Mathematica
    p[n_] := If[n > 0, Prime[n], 0]; ppQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; seq[ndigmax_] := Module[{t = Table[FromDigits[Flatten@ IntegerDigits@ (p /@ IntegerDigits[n])], {n, 0, 10^ndigmax - 1}]}, Union@ Select[t, 0 < # < 10^ndigmax && ppQ[#] &]]; seq[6] (* Amiram Eldar, Mar 26 2023 *)
  • PARI
    f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147
    lista(nn) = my(list = List(), m); for (n=0, nn, m = f(n); if ((m <= nn) && ispower(m), listput(list, m));); vecsort(Set(list)); \\ Michel Marcus, Mar 26 2023

A361820 Palindromes in A329150.

Original entry on oeis.org

0, 2, 3, 5, 7, 11, 22, 33, 55, 77, 202, 222, 232, 252, 272, 303, 313, 323, 333, 353, 373, 505, 525, 535, 555, 575, 707, 717, 727, 737, 757, 777, 1111, 2002, 2112, 2222, 2332, 2552, 2772, 3003, 3113, 3223, 3333, 3553, 3773, 5005, 5115, 5225, 5335, 5555, 5775, 7007, 7117
Offset: 1

Views

Author

Bernard Schott, Mar 25 2023

Keywords

Comments

If m is a palindrome with no digit greater than 5 in A118597, then A329147(m) is a term, but there exist terms that are not of this form as 313, 717, ...

Examples

			232 is a term which has two preimages since A329147(91) = A329147(121) = 232.
313 = A329147(26) is a term whose preimage is not in A118597.
2002 is a term since A329147(1001) = 2002.
2112 is a term since A329147(151) = 2112.
27172 = A329147(1471) is a term whose preimage is not in A118597.
		

Crossrefs

Intersection of A002113 and A329150.

Programs

  • Mathematica
    p[n_] := If[n > 0, Prime[n], 0]; seq[ndigmax_] := Module[{t = Table[FromDigits[ Flatten@ IntegerDigits@ (p /@ IntegerDigits[n])], {n, 0, 10^ndigmax - 1}]}, Union@ Select[t, # < 10^ndigmax && PalindromeQ[#] &]]; seq[4] (* Amiram Eldar, Mar 26 2023 *)
  • PARI
    ispal(n) = my(d=digits(n)); d==Vecrev(d);
    f(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0); \\ A329147
    lista(nn) = my(list = List(), m); for (n=0, nn, m = f(n); if ((m <= nn) && ispal(m), listput(list, m));); vecsort(Set(list)); \\ Michel Marcus, Mar 26 2023

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

Original entry on oeis.org

0, 2, 3, 5, 7, 11, 13, 17, 19, 23, 20, 22, 23, 25, 27, 211, 213, 217, 219, 223, 30, 32, 33, 35, 37, 311, 313, 317, 319, 323, 50, 52, 53, 55, 57, 511, 513, 517, 519, 523, 70, 72, 73, 75, 77, 711, 713, 717, 719, 723, 110, 112, 113, 115, 117, 1111, 1113, 1117, 1119, 1123
Offset: 0

Views

Author

Bernard Schott, Nov 06 2019

Keywords

Comments

Some properties:
No term has a digit 4, 6 or 8.
No term begins with 9, 10, 12, 15, 29, 39, 59, 79.
If a is regarded as a function a: n --> a(n) from N to N, then
1) a is neither increasing: a(9) > a(10) nor decreasing: a(3) < a(4),
2) a is not injective: a(92) = a(122) = 233,
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.
Some primes remain primes: 2, 3, 5, 7, 19, 59, ...
Some primes become composites: 11, 13, 17, 23, 29, 31, ...
Some composites remain composites: 10, 14, 16, 18, 20, 21, 22,...
Some composites become primes: 4, 6, 8, 9, 12, 15, 24, 25, 26,...
When n > 4 ends respectively with 0, 1 or 3 then a(n) that ends with 0, 2, 5 is composite.
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
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

Examples

			As a(2) = prime(2) = 3, a(5) = prime(5) = 11 and a(8) = prime(8) = 19, a(258)= 31119.
As a(3) = prime(3) = 5, a(0) = 0 and a(7) = prime(7) = 17, hence a(307) = 5017.
		

Crossrefs

Similar to A048380, A048385 and A322131.

Programs

  • 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
    
  • Maple
    a:= n-> (l-> parse(cat(seq(`if`(l[-i]=0, 0, ithprime(l[-i])),
                 i=1..nops(l)))))(convert(n, base, 10)):
    seq(a(n), n=0..80);  # Alois P. Heinz, Nov 07 2019
  • Mathematica
    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 *)
  • PARI
    a(n) = if (n, fromdigits(concat(apply(d -> if (d, digits(prime(d)), [0]), digits(n)))), 0) \\ Rémy Sigrist, Nov 07 2019
    
  • Python
    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)))))
    print([A329147(n) for n in range(60)]) # Michael S. Branicky, Apr 10 2023
Showing 1-4 of 4 results.