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 17 results. Next

A061656 Numbers k > 1 such that, in base 2, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

53, 106, 211, 212, 397, 403, 417, 419, 422, 424, 437, 441, 459, 781, 794, 801, 806, 817, 833, 834, 838, 839, 841, 844, 848, 865, 874, 882, 885, 918, 979, 1481, 1549, 1562, 1565, 1571, 1573, 1585, 1588, 1589, 1602, 1612, 1613, 1634, 1637, 1665, 1666, 1667, 1668
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			53 = 110101_2 and 53^2 = 101011111001_2.
		

Crossrefs

Programs

  • Maple
    p:= n-> add(x^i, i=convert(n, base, 2)):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 10 2015
  • Mathematica
    b2pQ[n_]:=Module[{bn=IntegerDigits[n,2],b2n=IntegerDigits[n^2,2], cbn0, cb2n0}, cbn0=Count[bn,0];cb2n0=Count[b2n,0];cbn0>0&&cb2n0>0 && Count[ bn,1]/cbn0==Count[b2n,1]/cb2n0]; Select[Range[1700],b2pQ] (* Harvey P. Dale, Jan 25 2012 *)
  • Python
    from fractions import Fraction
    from itertools import count, islice
    def f(i, j):
        bi, bj = bin(i)[2:], bin(j)[2:]
        pi = [Fraction(bi.count(d), len(bi)) for d in "01"]
        pj = [Fraction(bj.count(d), len(bj)) for d in "01"]
        return pi == pj
    def ok(n): return f(n, n**2)
    print([k for k in range(2, 1700) if ok(k)]) # Michael S. Branicky, Feb 27 2023

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061657 Numbers k > 1 such that, in base 3, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

184, 196, 464, 500, 544, 550, 552, 584, 588, 622, 626, 670, 706, 1392, 1436, 1472, 1500, 1552, 1632, 1650, 1654, 1656, 1744, 1752, 1764, 1866, 1868, 1878, 1978, 2010, 2030, 2116, 2118, 3922, 4136, 4176, 4308, 4388, 4416, 4500, 4656, 4732, 4756, 4896, 4900
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			184 = 20211_3 and 184^2 = 1201102221_3.
		

Crossrefs

Programs

  • Maple
    p:= n-> add(x^i, i=convert(n, base, 3)):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 10 2015

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061658 Numbers k > 1 such that, in base 4, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

45, 165, 180, 657, 660, 720, 882, 2165, 2193, 2331, 2625, 2628, 2640, 2880, 3362, 3470, 3528, 3606, 3683, 3825, 8285, 8294, 8337, 8381, 8477, 8493, 8519, 8525, 8660, 8721, 8772, 8817, 9069, 9282, 9324, 9479, 9507, 9869, 9969, 10185, 10349, 10353, 10500, 10512
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			45 = 231_4 and 45^2 = 133221_4.
		

Crossrefs

Programs

  • Maple
    p:= n-> add(x^i, i=convert(n, base, 4)):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 10 2015

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061659 Numbers k > 1 such that, in base 5, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

9726, 10512, 10904, 12702, 12886, 13766, 13898, 14008, 15086, 37644, 41156, 42006, 42106, 44048, 44448, 44578, 44756, 44826, 48630, 48664, 49482, 49626, 49652, 49676, 51704, 52560, 52582, 54262, 54520, 54982, 57922, 59672, 60778, 63510, 64430, 64736, 65432
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			9726 = 302401_5 and 9726^2 = 143204020301_5.
		

Crossrefs

Programs

  • Maple
    p:= n-> add(x^i, i=convert(n, base, 5)):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 10 2015

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061660 Numbers k > 1 such that, in base 6, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

3697, 3940, 4802, 5845, 5905, 21127, 21715, 22182, 22867, 22897, 23380, 23640, 24367, 26815, 28812, 28910, 32192, 33705, 33815, 35000, 35065, 35070, 35430, 35977, 37082, 37712, 40277, 44535, 122915, 125947, 126762, 128350, 129670, 130290, 133092, 134397
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			3697 = 25041_6 and 3697^2 = 1204540521_6.
		

Crossrefs

Programs

  • Maple
    p:= n-> add(x^i, i=convert(n, base, 6)):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 10 2015

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061661 Numbers k > 1 such that, in base 7, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

30, 210, 1470, 10290, 10652, 11636, 53544, 53730, 59130, 64896, 72030, 74564, 81452, 93510, 94356, 94400, 97038, 113754, 348540, 364016, 374808, 375204, 376110, 378642, 413910, 420848, 454272, 476352, 479642, 483428, 485460, 488232, 503648, 504210, 516302
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			30 = 42_7 and 30^2 = 2424_7.
		

Crossrefs

Extensions

More terms from Naohiro Nomoto, Oct 04 2001
Offset changed to 1 by Alois P. Heinz, May 10 2015

A061662 Numbers k > 1 such that, in base 8, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

266, 273, 282, 2058, 2065, 2128, 2184, 2256, 13771, 14931, 16394, 16401, 16450, 16464, 16513, 16520, 16634, 16674, 16898, 17024, 17409, 17472, 18048, 24852, 110168, 119448, 122297, 131082, 131089, 131138, 131152, 131201, 131208, 131600
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			266 = 412_8 and 266^2 = 212144_8.
		

Crossrefs

Extensions

Offset changed to 1 by Alois P. Heinz, May 10 2015

A061663 Numbers k > 1 such that, in base 9, k and k^2 contain the same digits in the same proportion.

Original entry on oeis.org

2890, 26010, 188722, 234090, 235954, 260416, 390688, 484094, 511234, 1621474, 1651654, 1698498, 1953842, 2022214, 2106810, 2123586, 2202230, 2283388, 2296028, 2343744, 2485838, 2496508, 2559962, 2595386, 2627210, 2841118, 3091018, 3118760, 3309540, 3334316, 3483208
Offset: 1

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			2890 = 3861_9 and 2890^2 = 16638831_9.
		

Crossrefs

Extensions

More terms from Naohiro Nomoto, Oct 04 2001
Offset changed to 1 by Alois P. Heinz, May 10 2015
Terms a(13)-a(31) and beyond from Seiichi Manyama, Aug 20 2023

A199630 Numbers having each digit once and whose square has each digit twice.

Original entry on oeis.org

3175462089, 3175804269, 3204957816, 3206549178, 3210754689, 3254196708, 3260974851, 3275409816, 3284591706, 3290581476, 3406829517, 3410856297, 3459186720, 3469857012, 3475806912, 3501249678, 3512067849, 3519876240, 3549716208, 3564980172, 3587902614
Offset: 1

Views

Author

T. D. Noe, Nov 09 2011

Keywords

Examples

			3175462089^2 = 10083559478676243921.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199631, A365144, A199632, A199633. Subsequence of A114258.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^2]] == {2} &]; FromDigits /@ t2

A061664 a(n) is the smallest number k >= 2 for which k and k^2 contain the same digits in the same proportion in base n.

Original entry on oeis.org

53, 184, 45, 9726, 3697, 30, 266, 2890, 72576, 121892, 1604132, 22423892, 31215, 61572224, 532740, 49520, 495341325, 7900478246, 19972726643, 1006557500, 1163503182, 8736, 936946009
Offset: 2

Views

Author

Erich Friedman, Jun 16 2001

Keywords

Examples

			a(9) = 2890 since 2890 = 3861 in base 9 and 2890^2 = 16638831 in base 9.
		

Crossrefs

Programs

  • Python
    from fractions import Fraction
    from sympy.ntheory import digits
    from itertools import count, islice
    def f(i, j, base):
        si, sj = digits(i, base)[1:], digits(j, base)[1:]
        pi = [Fraction(si.count(d), len(si)) for d in range(base)]
        pj = [Fraction(sj.count(d), len(sj)) for d in range(base)]
        return pi == pj
    def a(n): return next(k for k in count(2) if f(k, k**2, n))
    print([a(n) for n in range(2, 12)]) # Michael S. Branicky, Feb 27 2023

Extensions

More terms from Naohiro Nomoto, Oct 06 2001
Title clarified and a(15)-a(24) from Sean A. Irvine, Feb 27 2023
Showing 1-10 of 17 results. Next