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

A204139 Primes p such that 9p^2 is a penholodigital square (A036744).

Original entry on oeis.org

5227, 7673, 8147, 8269, 8353, 8647, 8803, 9043, 9091
Offset: 1

Views

Author

Zak Seidov, Jan 11 2012

Keywords

Comments

Subsequence of A071519/3.

Crossrefs

A071519 Numbers whose square is a zeroless pandigital number (i.e., use the digits 1 through 9 once).

Original entry on oeis.org

11826, 12363, 12543, 14676, 15681, 15963, 18072, 19023, 19377, 19569, 19629, 20316, 22887, 23019, 23178, 23439, 24237, 24276, 24441, 24807, 25059, 25572, 25941, 26409, 26733, 27129, 27273, 29034, 29106, 30384
Offset: 1

Views

Author

Lekraj Beedassy, Jun 20 2002

Keywords

Crossrefs

A subset of A054037.

Programs

  • Maple
    lim:=floor(sqrt(987654321)): for n from floor(sqrt(123456789)) to lim do d:=[op(convert(n^2, base, 10))]: pandig:=true: for k from 1 to 9 do if(numboccur(k, d)<>1)then pandig:=false: break: fi: od: if(pandig)then printf("%d, ", n): fi: od: # Nathaniel Johnston, Jun 22 2011
  • Mathematica
    Sqrt[#]&/@Select[FromDigits/@Permutations[Range[9]],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Sep 23 2011 *)
    Select[Range[11112, 31427,3], DigitCount[#^2] == {1,1,1,1,1,1,1,1,1,0} &]  (* Zak Seidov, Jan 11 2012 *)
  • PARI
    A071519 = select( {is_A071519(n,L=[1..9])=vecsort(digits(n^2))==L}, [1e5\9..1e5\3]) \\ M. F. Hasler, Jun 28 2023

Formula

a(n) = sqrt(A036744(n)). - Zak Seidov, Jan 11 2012

A235724 Squares which have one or more occurrences of exactly nine different digits.

Original entry on oeis.org

102495376, 102576384, 102738496, 104325796, 105637284, 139854276, 152843769, 157326849, 158306724, 158407396, 172843609, 176039824, 176305284, 178035649, 180472356, 183467025, 187635204, 198753604, 208571364, 215384976, 217356049, 218034756, 235714609
Offset: 1

Views

Author

Colin Barker, Jan 15 2014

Keywords

Comments

The first term having a repeated digit is 1005397264.
The smallest penholodigital square is a(6) = A036744(1) = 139854276 and the largest one is a(83) = A036744(30) = 923187456 (see Penguin references). - Bernard Schott, Feb 07 2022

Examples

			102495376 is in the sequence because 102495376 = 10124^2 and 102495376 contains exactly nine different digits: 0, 1, 2, 3, 4, 5, 6, 7 and 9.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Revised Edition), Penguin Books, 1997, entry 139854276, page 184 and entry 923187456, page 186.

Crossrefs

Cf. A054037.
A036744 is a subsequence.

Programs

  • PARI
    s=[]; for(n=1, 100000, if(#vecsort(eval(Vec(Str(n^2))),,8)==9, s=concat(s, n^2))); s
    
  • Python
    from itertools import count, islice
    def agen(): yield from (r*r for r in count(10**4) if len(set(str(r*r)))==9)
    print(list(islice(agen(), 23))) # Michael S. Branicky, May 24 2022

Formula

a(n) = A054037(n)^2.

A363905 Numbers whose square and cube taken together contain each decimal digit.

Original entry on oeis.org

69, 128, 203, 302, 327, 366, 398, 467, 542, 591, 593, 598, 633, 643, 669, 690, 747, 759, 903, 923, 943, 1016, 1018, 1027, 1028, 1043, 1086, 1112, 1182, 1194, 1199, 1233, 1278, 1280, 1282, 1328, 1336, 1364, 1396, 1419, 1459, 1463, 1467, 1472, 1475
Offset: 1

Views

Author

M. F. Hasler, Jun 27 2023

Keywords

Comments

The first term, a(1) = 69, is the only number for which the square and the cube together contain each decimal digit 0 to 9 exactly once.
a(820) = 6534 is the only number of which the square and cube taken together contain each digit 0 to 9 exactly twice.

Examples

			69^2 = 4761, 69^3 = 328509, which together contain each digit 0-9 exactly once.
		

Crossrefs

Cf. A036744, A054038, A071519 and A156977 for "pandigital" squares.
Cf. A119735: Numbers n such that every digit occurs at least once in n^3.

Programs

  • Mathematica
    fQ[n_] := Union[ Join[ IntegerDigits[n^2], IntegerDigits[n^3]]] == {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; Select[Range@1500, fQ] (* Robert G. Wilson v, Jun 27 2023 *)
  • PARI
    is(k)=#setunion(Set(digits(k^2)),Set(digits(k^3)))>9
    select(is,[1..9999])
    
  • Python
    from itertools import count, islice
    def A363905_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:len(set(str(n**2))|set(str(n**3)))==10,count(max(startvalue,1)))
    A363905_list = list(islice(A363905_gen(),20)) # Chai Wah Wu, Jun 27 2023

A363927 Numbers N such that in the concatenation of N^2 and N^3, each of the 10 decimal digits appears equally often.

Original entry on oeis.org

69, 6534, 497375, 539019, 543447, 586476, 589629, 601575, 646479, 858609, 895688, 959097, 46839081, 47469378, 47693199, 47760623, 47841576, 48038964, 48527792, 48733506, 48886836, 48965892, 49229103, 49397283, 49594832, 49670616, 50013116, 50247423, 50359157
Offset: 1

Views

Author

Keywords

Comments

a(3) = 497375 and a(11) = 895688 are the only terms < 10^6 that are not divisible by 3.
Each term has an even number of decimal digits, k, and a corresponding value between 10^(k-1)*100^(1/3) and 10^k. - Michael S. Branicky, Jun 29 2023
Indeed, the number of digits of concat(N^2, N^3) is floor(2*L + 1) + floor(3*L + 1) where L = log_10(N). This is a multiple of 10 iff L mod 2 is in the interval [5/3, 2), which means that N is in the above range for some even k. - M. F. Hasler, Jul 02 2023

Crossrefs

Cf. A363905, A363909: concat(n^2, n^3) has each digit at least once / twice.
Cf. A171102: pandigital numbers.
Cf. A036744, A054038, A071519 and A156977 for "pandigital squares".
Cf. A119735: n^3 is pandigital.

Programs

  • Mathematica
    fQ[n_] := Length@ Union[ Count[ Sort[ Join[ IntegerDigits[n^2], IntegerDigits[n^3]]], #] & /@ Range[0, 9]] == 1; Select[ Range@ 52000000, fQ] (* Robert G. Wilson v, Jul 01 2023 *)
  • PARI
    is(n)={my(v=concat(digits(n^2),digits(n^3)), c=#v); c%10==0 && vecsort(v)==[0..c-1]\(c\10)}
    for(n=1,1e6, is(n)&& print1(n","))

Extensions

a(13) and beyond from Michael S. Branicky, Jun 28 2023

A363909 Numbers whose square and cube taken together contain each decimal digit at least twice.

Original entry on oeis.org

6534, 11027, 11994, 21906, 22178, 22195, 23317, 24567, 27019, 27963, 28354, 29099, 29309, 29339, 29375, 29558, 29621, 30184, 30552, 30584, 31578, 31727, 32447, 32633, 32793, 32912, 32923, 33087, 33257, 33527, 34284, 35717, 36943, 36958, 37697, 38463
Offset: 1

Views

Author

M. F. Hasler, Jun 27 2023

Keywords

Comments

The first term, a(1) = 6534 is the only number of which the square and cube taken together contain each digit 0 to 9 exactly twice.
Presumably a(n) ~ A363905(n) ~ n. - Charles R Greathouse IV, Jul 03 2023

Examples

			6534^2 = 42693156, 6534^3 = 278957081304, which together contain each digit 0-9 exactly twice.
		

Crossrefs

Cf. A363905: square and cube together contain each digit at least once.
Cf. A036744, A054038, A071519 and A156977 for "pandigital" squares.
Cf. A119735: Numbers n such that every digit occurs at least once in n^3.

Programs

  • PARI
    is(n)=#Set(n=concat(digits(n^2),digits(n^3)))>9&&(n=vecsort(n))[#n-1]==9&&!n[2]&&!for(i=3,#n-2,n[i]>n[i-1]&&n[i]
    				

A370950 Number of penholodigital squares (containing each nonzero digit exactly once) in base n.

Original entry on oeis.org

1, 0, 0, 0, 2, 1, 1, 10, 30, 20, 23, 0, 160, 419, 740, 0, 5116, 47677
Offset: 2

Views

Author

Chai Wah Wu, Mar 06 2024

Keywords

Comments

From Chai Wah Wu, Mar 10 2024: (Start)
Theorem: Let m^2 be a pandigital square (containing each digit exactly once) or a penholodigital square (containing each nonzero digit exactly once) in base n. If n-1 is an odd squarefree number (A056911), then m is divisible by n-1. If n-1 is an even squarefree number (A039956), then m-(n-1)/2 is divisible by n-1.
Proof: Since n^k == 1 (mod n-1), and the sum of digits of m^2 is n*(n-1)/2, this implies that m^2 == n*(n-1)/2 (mod n-1). If n-1 is odd and squarefree, then n is even and m^2 == 0 (mod n-1). Since n-1 = Product_i p_i for distinct odd primes p_i, and m^2 == 0 (mod p_i) if and only if m == 0 (mod p_i), this implies that m == 0 (mod n-1) by the Chinese Remainder Theorem.
Similarly, if n-1 is even and squarefree, then m^2 == n(n-1)/2 == (n-1)/2 (mod n-1) and (n-1)/2 = Product_i p_i for distinct odd primes p_i, i.e., m^2 == 0 (mod p_i) and m^2 == 1 (mod 2). This implies that m == 0 (mod p_i) and m == 1 (mod 2). Again by the Chinese Remainder Theorem, m == (n-1)/2 (mod n-1).
(End)

Examples

			For n=2 there is one penholodigital square, 1_2 = 1 = 1^2.
For n=6 there are two penholodigital squares, 15324_6 = 2500 = 50^2 and 53241_6 = 7225 = 85^2.
For n=7 there is one penholodigital square, 623514_7 = 106929 = 327^2.
For n=8 there is one penholodigital square, 6532471_8 = 1750329 = 1323^2.
For n=10 there are 30 penholodigital squares listed in A036744.
		

Crossrefs

Programs

  • Python
    from gmpy2 import mpz, digits, isqrt
    def A370950(n): # requires 2 <= n <= 62
        if n&1 and (~(m:=n-1>>1) & m-1).bit_length()&1:
            return 0
        t = ''.join(digits(d,n) for d in range(1,n))
        k = mpz(''.join(digits(d,n) for d in range(n-1,0,-1)),n)
        k2 = mpz(t,n)
        c = 0
        for i in range(isqrt(k2),isqrt(k)+1):
            if i%n:
                j = i**2
                s = ''.join(sorted(digits(j,n)))
                if s == t:
                    c += 1
        return c

Formula

If n is odd and n-1 has an even 2-adic valuation, then a(n) = 0 (see A258103).

Extensions

a(18) from Chai Wah Wu, Mar 07 2024
a(19) from Chai Wah Wu, Mar 15 2025

A383691 Square numbers with distinct digits from 1-9 that have an initial string of two or more digits forming a square number.

Original entry on oeis.org

169, 256, 361, 3249, 16384, 18496, 36481, 81796, 237169, 729316, 2537649, 3481956, 5184729, 36517849, 81432576, 254817369, 361874529, 529874361
Offset: 1

Views

Author

Hilarie Orman, May 05 2025

Keywords

Comments

The sequence is based on correspondence with Donald S. McDonald. He originated the idea and computed the complete list of terms.
The last two numbers in the sequence are perfect squares with square roots that are digit permutations of each other: 361874529 = 19023*19023 and 529874361 = 23019*23019.

Examples

			169 is a term, because 169 and 16 are both squares, and each digit of 169 is unique.
18496 is a term, because 18496 and 1849 are both squares, and each digit of 18496 is unique.
		

Crossrefs

Programs

  • Mathematica
    dd=Select[Range[11,25000]^2,IntegerLength[#]==CountDistinct[IntegerDigits[#]]&&ContainsNone[IntegerDigits[#],{0}]&];f[n_]:=AnyTrue[Table[FromDigits[Take[IntegerDigits[n],i]],{i,2,IntegerLength[n]-1}]^(1/2),IntegerQ];Select[dd,f[#]&] (* James C. McMahon, May 07 2025 *)
Showing 1-8 of 8 results.