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-10 of 19 results. Next

A308262 Numbers m such that A048385(m) ends with m.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 25, 36, 50, 51, 60, 61, 100, 101, 110, 111, 250, 251, 360, 361, 425, 500, 501, 510, 511, 600, 601, 610, 611, 936, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 1936, 2500, 2501, 2510, 2511, 3600, 3601, 3610, 3611, 4250, 4251, 5000, 5001
Offset: 1

Views

Author

Rémy Sigrist, May 17 2019

Keywords

Comments

If m belongs to this sequence, then A048385(m) belongs to this sequence.
If m belongs to this sequence, then 10*m and 10*m + 1 belong to this sequence.
This sequence contains A007088.
All terms belong to A052419.
Let U be the infinite word ...|A048385^2(16)|A048385(16)|16425 and V be the infinite word ...|A048385^2(81)|A048385(81)|81936. The terms of this sequence consist of the last x digits of either U or V followed by y digits in {0,1}, where x and y are nonnegative integers. - Charlie Neder, May 17 2019

Examples

			The first terms, alongside A048385(a(n)), are:
  n   a(n)  A048385(a(n))
  --  ----  -------------
   1     0              0
   2     1              1
   3     5             25
   4     6             36
   5    10             10
   6    11             11
   7    25            425
   8    36            936
   9    50            250
  10    51            251
  11    60            360
  12    61            361
		

Crossrefs

Programs

  • MATLAB
    m=1;
    for u=0:5001
        digit=dec2base(u,10)-'0';digitp=digit.^2;
        aa=str2num(strrep(num2str(digitp), ' ', ''));
        digitaa=dec2base(aa,10)-'0';
           if mod(aa,10^length(digit))==u
            sol(m)=u; m=m+1;
           end
    end
    sol % Marius A. Burtea, May 17 2019
  • PARI
    See Links section.
    

A322131 In the decimal expansion of n, replace each digit d with 2*d.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 210, 212, 214, 216, 218, 40, 42, 44, 46, 48, 410, 412, 414, 416, 418, 60, 62, 64, 66, 68, 610, 612, 614, 616, 618, 80, 82, 84, 86, 88, 810, 812, 814, 816, 818, 100, 102, 104, 106, 108, 1010, 1012, 1014
Offset: 0

Views

Author

Rémy Sigrist, Nov 27 2018

Keywords

Comments

This is an operation on digit strings: 1066 becomes 201212, for example. 86420 becomes 1612840. The result is always even - see A330336. - N. J. A. Sloane, Dec 17 2019
This sequence is a variant of A124108 in decimal base.

Examples

			For n = 109:
- we replace "1" with "2", "0" with "0" and "9" with "18",
- hence a(109) = 2018.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
    local m,d;
    d:= n mod 10; m:= floor(n/10);
    if d >= 5 then 100*procname(m) + 2*d
    else 10*procname(m)+2*d
    fi
    end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Nov 28 2018
  • Mathematica
    a[n_] := FromDigits@Flatten@IntegerDigits[2*IntegerDigits[n]]; Array[a, 60, 0] (* Amiram Eldar, Nov 28 2018 *)
  • PARI
    a(n, base=10) = my (d=digits(n, base), v=0); for (i=1, #d, v = v*base^max(1,#digits(2*d[i],base)) + 2*d[i]); v
    
  • Python
    def A322131(n):
       return int(''.join(str(int(d)*2) for d in str(n))) # Chai Wah Wu, Nov 29 2018

Formula

A061581(n+1) = a(A061581(n)).
A066686(a(n), a(k)) = a(A066686(n, k)) for any n > 0 and k > 0.
a(10*n + d) = 10*a(n) + 2*d for any n >= 0 and d = 0..4.
a(10*n + d) = 100*a(n) + 2*d for any n >= 0 and d = 5..9.
G.f. g(x) satisfies g(x) = (2*x + 4*x^2 + 6*x^3 + 8*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 16*x^8 + 18*x^9)/(1-x^10) + (10 + 10*x + 10*x^2 + 10*x^3 + 10*x^4 + 100*x^5 + 100*x^6 + 100*x^7 + 100*x^8 + 100*x^9)*g(x^10). - Robert Israel, Nov 28 2018

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

A048388 Replacing digits d in decimal expansion of n with d^2 yields a prime.

Original entry on oeis.org

11, 13, 17, 19, 21, 27, 51, 57, 71, 73, 81, 87, 89, 91, 101, 103, 107, 119, 123, 129, 131, 133, 137, 149, 153, 161, 167, 169, 173, 189, 191, 197, 199, 201, 203, 207, 213, 223, 229, 231, 233, 249, 253, 267, 283, 307, 311, 313, 319, 321, 331, 337, 341, 359, 371
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			199 = (1)(9)(9) -> (1)(81)(81) = 18181 which is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[400],PrimeQ[FromDigits[Flatten[IntegerDigits/@ (IntegerDigits[ #]^2)]]]&] (* Harvey P. Dale, Oct 13 2013 *)

A048386 Numbers n such that replacing digits d in decimal expansion of n with d^2 yields a square.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 23, 43, 49, 61, 100, 122, 136, 148, 163, 200, 221, 244, 269, 300, 305, 366, 400, 481, 488, 500, 600, 629, 700, 800, 884, 900, 1105, 1127, 1222, 1241, 1281, 1438, 1522, 1641, 1805, 2300, 2405, 2722, 2966, 3203, 4205, 4300, 4402
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			2722 = (2)(7)(2)(2) -> (4)(49)(4)(4) = 44944 = 212^2 and square.
		

Crossrefs

Programs

  • Magma
    f:=func; [0] cat [k:k in [1..4500]|IsSquare(f(k))]; // Marius A. Burtea, Feb 13 2020

A048387 Squares resulting from procedure described in A048386.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 49, 169, 1681, 361, 100, 144, 1936, 11664, 1369, 400, 441, 41616, 43681, 900, 9025, 93636, 1600, 16641, 166464, 2500, 3600, 36481, 4900, 6400, 646416, 8100, 11025, 11449, 1444, 14161, 14641, 116964, 12544, 136161
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

Programs

  • Magma
    f:=func; [0] cat [f(k):k in [1..4000]|IsSquare(f(k))]; // Marius A. Burtea, Feb 13 2020

Formula

a(n) = A048385(A048386(n)). - Michel Marcus, Feb 13 2020

Extensions

Offset 1 from Michel Marcus, Feb 13 2020

A048389 Primes resulting from procedure described in A048388.

Original entry on oeis.org

11, 19, 149, 181, 41, 449, 251, 2549, 491, 499, 641, 6449, 6481, 811, 101, 109, 1049, 1181, 149, 1481, 191, 199, 1949, 11681, 1259, 1361, 13649, 13681, 1499, 16481, 1811, 18149, 18181, 401, 409, 4049, 419, 449, 4481, 491, 499, 41681, 4259, 43649
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

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

Crossrefs

Formula

a(n) = A048385(A048388(n)). - Andrew Howroyd, Aug 15 2024

Extensions

Offset corrected by Andrew Howroyd, Aug 15 2024

A068522 In base 10 notation replace digits of n with their squared values (Version 2).

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 11, 14, 19, 26, 35, 46, 59, 74, 91, 40, 41, 44, 49, 56, 65, 76, 89, 104, 121, 90, 91, 94, 99, 106, 115, 126, 139, 154, 171, 160, 161, 164, 169, 176, 185, 196, 209, 224, 241, 250, 251, 254, 259
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 21 2002

Keywords

Examples

			a(13) = a(1*10^1 + 3*10^0) = 1^2*10^1 + 3^2*10^0 = 10 + 9 = 19.
a(14) = a(1*10^1 + 4*10^0) = 1^2*10^1 + 4^2*10^0 = 10 + 16 = 26.
a(48) = a(4*10^1 + 8*10^0) = 4^2*10^1 + 8^2*10^0 = 160 + 64 = 224.
		

Crossrefs

See A048385 for another version.

Programs

  • Haskell
    a068522 0 = 0
    a068522 n = 10 * a068522 n' + m ^ 2  where (n', m) = divMod n 10
    -- Reinhard Zumkeller, Jul 08 2014
  • Maple
    a:= n-> (s-> add(parse(s[-i])^2*10^(i-1), i=1..length(s)))(""||n):
    seq(a(n), n=0..70);  # Alois P. Heinz, Jul 04 2014
  • Mathematica
    FromDigits[IntegerDigits[#]^2] & /@ Range@ 53 (* Michael De Vlieger, Apr 01 2015 *)

Formula

a(n) = Sum_{i=0..g} d(i)*d(i)*10^i, where n = Sum_{d=0..9} d(i)*10^i is the decimal expansion of n.

A244557 Numbers obtained by concatenating the squares of the digits of prime(n).

Original entry on oeis.org

4, 9, 25, 49, 11, 19, 149, 181, 49, 481, 91, 949, 161, 169, 1649, 259, 2581, 361, 3649, 491, 499, 4981, 649, 6481, 8149, 101, 109, 1049, 1081, 119, 1449, 191, 1949, 1981, 11681, 1251, 12549, 1369, 13649, 1499, 14981, 1641, 1811, 1819, 18149, 18181, 411, 449
Offset: 1

Views

Author

Vincenzo Librandi, Jul 02 2014

Keywords

Examples

			For n = 7, prime(7) = 17 and a(7) = 149, which is the concatenation of the squares of the digits of 17. For n = 31, prime(31) = 127 and a(31) = 1449; but this term also appears at index 200, in fact prime(200) = 1223 and a(200) = 1449.
		

Crossrefs

Programs

  • Magma
    [StringToInteger(&cat[IntegerToString(h): h in Reverse([i^2: i in Intseq(p)])]): p in PrimesUpTo(250)];
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[Prime[n]]^2)]],{n,50}] (* Harvey P. Dale, Aug 18 2016 *)

Formula

a(n) = A048385(A000040(n)).

Extensions

Edited by Bruno Berselli, Jul 02 2014

A308170 Start with the number 7, repeatedly square every digit in place to get a new number; in the limit this process converges (reading from right to left) to the string shown here.

Original entry on oeis.org

1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 1, 6, 3, 9, 1, 6, 3, 9, 1, 6, 3, 9, 1, 8, 1, 6, 3, 9, 1, 8, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 9, 1, 8, 1, 4, 6, 1, 6, 1, 6, 3, 1, 6, 3, 9
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2019, following a suggestion from Jeremy Gardiner

Keywords

Comments

If we start with 3 or 9, we get the same sequence. If instead we start with 2, 4, 6, or 8 we get the same sequence but without the initial 1. If we start with 5 we get A308171. [Corrected by M. F. Hasler, May 15 2019]
Comment from Jean-Paul Allouche, May 15 2019: These sequences can be obtained in the order shown (that is, in the right-to-left order) by starting with 7 (say), and repeatedly applying the morphism on the alphabet {1,2,3,...,9} defined by 1 -> 1, 3 -> 9, 4 -> 61, 5 -> 52, 6 -> 63, 7 -> 94, 8 -> 46, 9 -> 18.
If we start with 1, application of the morphism will never change that initial sequence of length 1: this is the third fixed point of the morphism. - M. F. Hasler, May 15 2019

Examples

			The successive numbers that arise are
7
49
1681
136641
193636161
1819369361361
1641819368193619361
...
and reading from the right we see 1,6,3,9, ...
		

Crossrefs

Programs

  • PARI
    { wanted = 87; a = [7]; while (1, b = concat(apply(d -> if (d,digits(d^2),[0]),a)); if (#b > wanted, b = b[#b-wanted+1..#b]); if (a==b, break, a = b)); print (Vecrev(a)) } \\ Rémy Sigrist, May 15 2019
    
  • PARI
    A308170_vec(N,a=[9])={while(a!=a=concat(apply(t->digits(t^2),if(#a>N,a[-N..-1],a))),); Vecrev(a[-N..-1])} \\ M. F. Hasler, May 15 2019

Extensions

More terms from Rémy Sigrist, May 15 2019
Showing 1-10 of 19 results. Next