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

A020332 Numbers whose base-4 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

5, 10, 15, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 1040, 1105, 1170, 1235, 1300, 1365, 1430, 1495, 1560, 1625, 1690, 1755, 1820, 1885, 1950, 2015, 2080, 2145, 2210, 2275, 2340, 2405, 2470, 2535, 2600, 2665, 2730, 2795, 2860, 2925, 2990
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			102_10 = 1212_4. - _Jon E. Schoenfield_, Feb 11 2021
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n + n*4^Floor[Log[4, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)
    b4jQ[n_]:=Module[{idn4=IntegerDigits[n,4],len},len=Length[idn4];EvenQ[len] && Take[ idn4,len/2]==Take[idn4,-len/2]]; Select[Range[3000],b4jQ] (* or *) Table[If[ #[[1]] == 0,Nothing,FromDigits[#,4]]&/@(Flatten[Join[{#,#}]]&/@Tuples[ {0,1,2,3},n]),{n,3}]//Flatten(* Harvey P. Dale, Sep 02 2022 *)

Formula

a(n) = n*4^floor(log_4(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A020333 Numbers whose base-5 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

6, 12, 18, 24, 130, 156, 182, 208, 234, 260, 286, 312, 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, 3150, 3276, 3402, 3528, 3654, 3780, 3906, 4032, 4158, 4284, 4410, 4536, 4662, 4788, 4914, 5040, 5166, 5292, 5418, 5544, 5670, 5796, 5922, 6048
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			182_10 = 1212_5. - _Jon E. Schoenfield_, Feb 11 2021
		

Crossrefs

Programs

  • Mathematica
    tis5Q[n_]:=Module[{idn=IntegerDigits[n,5],len},len=Length[idn];EvenQ[len] && Take[idn,len/2]==Take[idn,-len/2]]; Select[Range[6500],tis5Q]  (* or *) Flatten[Table[FromDigits[#,5]&/@Select[(Flatten[{#,#}]&/@Tuples[ Range[ 0,4],n]),#[[1]]!=0&],{n,3}]] (* The second program is significantly faster than the first. *) (* Harvey P. Dale, Apr 08 2013 *)
    a[n_] := n + n*5^Floor[Log[5, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)
  • Python
    from itertools import count, product
    def agen():
        for d in count(1):
            for first in "1234":
                for p in product("01234", repeat=d-1):
                    yield int((first+"".join(p))*2, 5)
    g = agen()
    print([next(g) for n in range(1, 49)]) # Michael S. Branicky, Jun 12 2021

Formula

a(n) = n*5^floor(log_5(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A020334 Numbers whose base-6 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

7, 14, 21, 28, 35, 222, 259, 296, 333, 370, 407, 444, 481, 518, 555, 592, 629, 666, 703, 740, 777, 814, 851, 888, 925, 962, 999, 1036, 1073, 1110, 1147, 1184, 1221, 1258, 1295, 7812, 8029, 8246, 8463, 8680, 8897, 9114, 9331, 9548, 9765, 9982, 10199, 10416
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			296_10 = 1212_6. - _Jon E. Schoenfield_, Feb 11 2021
		

Crossrefs

Programs

  • Mathematica
    jtiQ[n_]:=Module[{idn6=IntegerDigits[n,6],len},len=Length[idn6];EvenQ[ len] && Take[idn6,len/2]==Take[idn6,(-len/2)]]; Select[ Range[ 11000], jtiQ] (* Harvey P. Dale, May 29 2016 *)
    a[n_] := n + n*6^Floor[Log[6, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)

Formula

a(n) = n*6^floor(log_6(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A020335 Numbers whose base-7 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

8, 16, 24, 32, 40, 48, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500, 1550, 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1950, 2000, 2050, 2100, 2150, 2200, 2250, 2300, 2350
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			450_10 = 1212_7. - _Jon E. Schoenfield_, Feb 12 2021
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n + n*7^Floor[Log[7, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)

Formula

a(n) = n*7^floor(log_7(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A020336 Numbers whose base-8 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

9, 18, 27, 36, 45, 54, 63, 520, 585, 650, 715, 780, 845, 910, 975, 1040, 1105, 1170, 1235, 1300, 1365, 1430, 1495, 1560, 1625, 1690, 1755, 1820, 1885, 1950, 2015, 2080, 2145, 2210, 2275, 2340, 2405, 2470, 2535, 2600, 2665, 2730, 2795, 2860, 2925, 2990, 3055
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			650_10 = 1212_8. - _Jon E. Schoenfield_, Feb 12 2021
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n + n*8^Floor[Log[8, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)

Formula

a(n) = n*8^floor(log_8(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A020337 Numbers whose base-9 representation is the juxtaposition of two identical strings.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 738, 820, 902, 984, 1066, 1148, 1230, 1312, 1394, 1476, 1558, 1640, 1722, 1804, 1886, 1968, 2050, 2132, 2214, 2296, 2378, 2460, 2542, 2624, 2706, 2788, 2870, 2952, 3034, 3116, 3198, 3280, 3362, 3444, 3526, 3608, 3690, 3772
Offset: 1

Views

Author

David W. Wilson, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Keywords

Examples

			902_10 = 1212_9. - _Jon E. Schoenfield_, Feb 12 2021
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n + n*9^Floor[Log[9, n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 06 2021 *)

Formula

a(n) = n*9^floor(log_9(n)+1) + n. - Ilya Gutkovskiy, Jan 26 2018

A338086 Duplicate the ternary digits of n, so each 0, 1 or 2 becomes 00, 11 or 22 respectively.

Original entry on oeis.org

0, 4, 8, 36, 40, 44, 72, 76, 80, 324, 328, 332, 360, 364, 368, 396, 400, 404, 648, 652, 656, 684, 688, 692, 720, 724, 728, 2916, 2920, 2924, 2952, 2956, 2960, 2988, 2992, 2996, 3240, 3244, 3248, 3276, 3280, 3284, 3312, 3316, 3320, 3564, 3568, 3572, 3600, 3604
Offset: 0

Views

Author

Kevin Ryde, Oct 09 2020

Keywords

Comments

Also, numbers whose ternary digit runs are all even lengths (including 0 reckoned as no digits at all). Also, change ternary digits 0,1,2 to base 9 digits 0,4,8, and hence numbers which can be written in base 9 using only digits 0,4,8.
Digit duplication 00,11,22 can be compared to A037314 which is 0 above each so 00,01,02, or A208665 which is 0 below each so 00,10,20. Duplication is the sum of these, or any one is a suitable multiple of another (*3, *4, etc).
This sequence is the points on the X=Y diagonal of the ternary Z-order curve (see example table in A163328). The Z-order curve takes a point number p and splits its ternary digits alternately to X and Y coordinates so X(p) = A163325(p) and Y(p) = A163326(p). Duplicate digits in a(n) are the diagonal X(a(n)) = Y(a(n)) = n.

Examples

			n=73 is ternary 2201 which duplicates to 22220011 ternary = 8804 base 9 = 6484 decimal.
		

Crossrefs

Cf. A020331 (ternary concatenation).
Digit duplication in other bases: A001196, A338754.

Programs

  • PARI
    a(n) = fromdigits(digits(n,3),9)<<2;
    
  • Python
    from gmpy2 import digits
    def A338086(n): return int(''.join(d*2 for d in digits(n,3)),3) # Chai Wah Wu, May 07 2022

Formula

a(n) = A037314(n) + A208665(n) = 4*A037314(n) = (4/3)*A208665(n).
a(n) = 4*Sum_{i=0..k} d[i]*9^i where the ternary expansion of n is n = Sum_{i=0..k} d[i]*3^i with digits d[i]=0,1,2.
Showing 1-7 of 7 results.