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

A338754 Duplicate each decimal digit of n, so 0 -> 00, ..., 9 -> 99.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 1100, 1111, 1122, 1133, 1144, 1155, 1166, 1177, 1188, 1199, 2200, 2211, 2222, 2233, 2244, 2255, 2266, 2277, 2288, 2299, 3300, 3311, 3322, 3333, 3344, 3355, 3366, 3377, 3388, 3399, 4400, 4411, 4422, 4433, 4444, 4455, 4466
Offset: 0

Views

Author

Kevin Ryde, Nov 06 2020

Keywords

Comments

This is equivalent to changing decimal digits 0,1,..,9 to base 100 digits 0,11,..,99, so the sequence is numbers which can be written in base 100 using only digits 0,11,..,99. Also, numbers whose decimal digit runs are all even lengths (including 0 as no digits at all).
This sequence first differs from A044836 (apart from term 0) at a(100) = 110000 whereas A044836(100) = 10011, because A044836 allows odd length digit runs provided there are more even than odd.

Examples

			For n=5517, digits duplicate to a(n) = 55551177.
		

Crossrefs

Cf. A051022 (0 above each digit), A044836.
Other bases: A001196, A338086.

Programs

  • PARI
    a(n) = fromdigits(digits(n),100)*11;
    
  • Python
    def A338754(n): return int(''.join(d*2 for d in str(n))) # Chai Wah Wu, May 07 2022

Formula

a(n) = Sum_{i=0..k} 11*d[i]*100^i where the decimal expansion of n is n = Sum_{i=0..k} d[i]*10^i with digits 0 <= d[i] <= 9.
a(n) = A051022(n)*11 for n > 0. - Kritsada Moomuang, Oct 20 2019

A044828 Positive integers having more base-2 runs of even length than odd.

Original entry on oeis.org

3, 12, 15, 19, 25, 27, 48, 51, 60, 63, 67, 76, 79, 97, 99, 100, 102, 103, 108, 111, 115, 121, 123, 147, 153, 155, 179, 192, 195, 201, 203, 204, 205, 207, 211, 217, 219, 240, 243, 252, 255, 259, 268, 271, 304, 307, 316, 319, 385
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A044836 (for base 10).

Programs

  • Mathematica
    meQ[n_]:=Module[{b=Boole[EvenQ[Length/@Split[IntegerDigits[n,2]]]]}, Count[ b,1]> Length[b]/2]; Select[Range[400],meQ] (* Harvey P. Dale, Aug 02 2013 *)

A248126 a(n) = n^2 with each digit repeated.

Original entry on oeis.org

11, 44, 99, 1166, 2255, 3366, 4499, 6644, 8811, 110000, 112211, 114444, 116699, 119966, 222255, 225566, 228899, 332244, 336611, 440000, 444411, 448844, 552299, 557766, 662255, 667766, 772299, 778844, 884411, 990000, 996611, 11002244, 11008899, 11115566
Offset: 1

Views

Author

Jon Perry, Nov 01 2014

Keywords

Comments

Inspired by A116699.

Examples

			13^2 = 169, so a(13) = 116699.
		

Crossrefs

Programs

  • JavaScript
    for (i=1;i<40;i++) {
    s=(i*i).toString();
    for (j=0;j
    				
  • Mathematica
    a248126[n_Integer] :=
    Module[{m}, m := IntegerDigits[n^2];
      FromDigits[Flatten[Transpose[List[m, m]]]]]; a248126 /@ Range[34] (* Michael De Vlieger, Nov 06 2014 *)
    Table[FromDigits[Riffle[id=IntegerDigits[n^2],id]],{n,40}] (* Harvey P. Dale, Dec 19 2015 *)
  • PARI
    a(n)= my(d = 11*digits(n^2)); fromdigits(d, 100) \\ David A. Corneth, Dec 02 2023
    
  • Python
    def a(n): return int("".join(d*2 for d in str(n**2)))
    print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Dec 02 2023
Showing 1-3 of 3 results.