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.

A222210 In the number n, replace all (decimal) digits '0' with '1' and vice versa.

Original entry on oeis.org

1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 21, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 30, 32, 33, 34, 35, 36, 37, 38, 39, 41, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 50, 52, 53, 54, 55, 56, 57, 58, 59, 61, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 70, 72, 73, 74, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 12 2013

Keywords

Comments

The map which is applied to primes in A171013 and A175791.

Crossrefs

Programs

  • Mathematica
    a[n_] := IntegerDigits[n] /. {0 -> 1, 1 -> 0} // FromDigits; Table[a[n], {n, 0, 75}] (* Jean-François Alcover, Jun 11 2013 *)
  • PARI
    A222210(n,d=[1,0,2,3,4,5,6,7,8,9])=sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n) \\ N.B.: PARI's digits() function returns [] for 0.

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

A048381 Numbers k such that replacing each nonzero digit d with the d-th prime (replacing each 0 digit with a 1) yields a prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 19, 20, 24, 25, 26, 27, 32, 39, 40, 42, 48, 52, 57, 59, 60, 64, 68, 72, 79, 80, 82, 84, 86, 92, 95, 100, 105, 106, 112, 114, 116, 122, 125, 130, 134, 140, 144, 145, 146, 148, 150, 152, 160, 164, 166, 167, 168, 169, 176
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			176 = (1)(7)(6) -> (2)(17)(13) = 21713, which is a prime, so 176 is in the sequence.
		

Crossrefs

Programs

  • Maple
    filter := proc(n) local L;
      L:= convert(n,base,10);
      L:= subs([0=1,seq(i=ithprime(i),i=1..9)],L);
      L:= map(t -> op(convert(t,base,10)), L);
      isprime(add(L[i]*10^(i-1),i=1..nops(L)))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 16 2018

Extensions

Offset corrected by Robert Israel, Oct 16 2018

A048383 Numbers k such that replacing each nonzero digit d with the d-th prime (replacing each 0 digit with a 1) yields a square.

Original entry on oeis.org

0, 13, 113, 2410, 4113, 6113, 8210, 14113, 23410, 28113, 33113, 34010, 35113, 51113, 62113, 71113, 76610, 81410, 93113, 101310, 117010, 123113, 242210, 253113, 279710, 298113, 300113, 351010, 513410, 529113, 544113, 616113, 634113
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			28113 = (2)(8)(1)(1)(3) -> (3)(19)(2)(2)(5) = 319225 = 565^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,650000],IntegerQ[Sqrt[FromDigits[Flatten[IntegerDigits/@ (If[#==0,1,Prime[#]]&/@IntegerDigits[#])]]]]&]  (* Harvey P. Dale, Mar 27 2011 *)

Extensions

Definition edited and offset corrected by M. F. Hasler, Oct 11 2019

A048384 Squares resulting from procedure described in A048383.

Original entry on oeis.org

1, 25, 225, 3721, 7225, 13225, 19321, 27225, 35721, 319225, 55225, 57121, 511225, 112225, 133225, 172225, 17131321, 192721, 235225, 212521, 2217121, 235225, 373321, 3115225, 317231721, 32319225, 511225, 5112121, 1125721, 11323225
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

A048382 Primes resulting from procedure described in A048381.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 23, 211, 223, 31, 37, 311, 313, 317, 53, 523, 71, 73, 719, 113, 1117, 1123, 131, 137, 1319, 173, 1723, 191, 193, 197, 1913, 233, 2311, 211, 2111, 2113, 223, 227, 2213, 233, 2311, 251, 257, 271, 277, 2711, 2713, 2719, 2111
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Primes in A048380 in order of their occurrence. - Andrew Howroyd, Aug 15 2024

Crossrefs

Formula

a(n) = A048380(A048381(n)). - Andrew Howroyd, Aug 15 2024

Extensions

Offset corrected by Andrew Howroyd, Aug 15 2024
Showing 1-6 of 6 results.