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.

A007936 Some permutation of digits is a square.

Original entry on oeis.org

1, 4, 9, 10, 16, 18, 25, 36, 40, 46, 49, 52, 61, 63, 64, 81, 90, 94, 100, 106, 108, 112, 121, 136, 144, 148, 160, 163, 169, 180, 184, 196, 205, 211, 225, 234, 243, 250, 252, 256, 259, 265, 279, 289, 295, 297, 298, 306, 316, 324, 342, 360, 361, 400, 406, 409, 414
Offset: 1

Views

Author

R. Muller

Keywords

References

  • M. Le, On Smarandache Pseudo-Powers of Third Kind, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 150-151.

Crossrefs

Cf. A235993 (leading zeros not allowed).

Programs

  • Mathematica
    Select[Range[500],Length[Select[FromDigits/@Permutations[ IntegerDigits[#]], IntegerQ[Sqrt[#]]&]]>0&]  (* Harvey P. Dale, Mar 30 2011 *)

A235994 Numbers having at least one anagram which is a cube.

Original entry on oeis.org

1, 8, 27, 46, 64, 72, 125, 126, 152, 162, 215, 216, 251, 261, 279, 297, 334, 343, 433, 512, 521, 612, 621, 729, 792, 927, 972, 1000, 1133, 1269, 1278, 1279, 1287, 1296, 1297, 1313, 1331, 1349, 1394, 1439, 1493, 1629, 1692, 1728, 1729, 1782, 1792, 1827, 1872
Offset: 1

Views

Author

Colin Barker, Jan 19 2014

Keywords

Comments

An anagram of a k-digit number is one of the k! permutations of the digits that does not begin with 0.

Examples

			126 is in the sequence because 216 = 6^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000],AnyTrue[Surd[FromDigits/@Select[ Permutations[ IntegerDigits[#]],#[[1]]>0&],3],IntegerQ]&] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 15 2016 *)
  • Python
    from itertools import count, takewhile
    def hash(n): return "".join(sorted(str(n)))
    def aupto_digits(d):
        cubes   = takewhile(lambda x:x<10**d, (i**3 for i in count(1)))
        C = set(map(hash, cubes))
        return [k for k in range(1, 10**d) if hash(k) in C]
    print(aupto_digits(4)) # Michael S. Branicky, Feb 18 2024

A337252 Digits of 2^n can be rearranged with no leading zeros to form t^2, for t not a power of 2.

Original entry on oeis.org

8, 10, 12, 14, 20, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150
Offset: 1

Views

Author

Jeffrey Shallit, Aug 21 2020

Keywords

Comments

n has to be even, since odd powers of 2 are congruent to 2,5,8 mod 9, while squares are congruent to 0,1,4,7 mod 9, and two numbers whose digits are rearrangements of each other are congruent modulo 9.
Is it true that all sufficiently large even numbers appear in this list?
22 is a term if leading zeros are allowed. 2^22 = 4194304 and 643^2 = 413449. - Chai Wah Wu, Aug 21 2020

Examples

			Here are the squares corresponding to the first few powers of 2:
2^8, 25^2
2^10, 49^2
2^12, 98^2
2^14, 178^2
2^20, 1028^2
2^26, 8291^2
2^28, 19112^2
2^30, 33472^2
2^32, 51473^2
2^34, 105583^2
2^36, 129914^2
2^38, 640132^2
2^40, 1081319^2
2^42, 1007243^2
2^44, 3187271^2
2^46, 4058042^2
2^48, 10285408^2
2^50, 32039417^2
2^52, 44795066^2
2^54, 100241288^2
From _Robert Israel_, Aug 21 2020: (Start)
2^56, 142847044^2
2^58, 318068365^2 (End)
From _Chai Wah Wu_, Aug 21 2020: (Start)
2^60, 1000562716^2
2^62, 1000709692^2
2^64, 3164169028^2
2^66, 4498215974^2
2^68, 10061077457^2
2^70, 31624545442^2
2^72, 34960642066^2
2^74, 100786105136^2
2^76, 105467328383^2
2^78, 316579648042^2
2^80, 1000556206526^2
2^82, 1001129296612^2
2^84, 3179799285956^2
2^86, 3333501503458^2
2^88, 10000006273742^2
2^90, 31624717039768^2
2^92, 31640399136637^2
2^94, 100001179435324^2
2^96, 100609261981363^2
2^98, 316227945405958^2
2^100, 1000000068136465^2
2^102, 1000000012839623^2
2^104, 3162279442052185^2
2^106, 3162295238497457^2
2^108, 10006109951303125^2
2^110, 31622778376826465^2
2^112, 31626290060004883^2
2^114, 100005555418898327^2
2^116, 100061093137010524^2
2^118, 316229698532373214^2
2^120, 1000000611139735223^2
2^122, 1005540208662183694^2
2^124, 3179814811220058566^2
2^126, 9994442844707576056^2
2^128, 31605185913938432804^2
2^130, 31799720491491676612^2
2^132, 99999944438762188450^2
2^134, 316052017518707374894^2
2^136, 100055595656929586657^2
2^138, 316227783779026656472^2
2^140, 3162277642424057210351^2
2^142, 1000056109592630240914^2
2^144, 3162279417006463372135^2
2^146, 3162279434557126331437^2
2^148, 10005559566228010636663^2
2^150, 99999999444438629490484^2 (End)
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,X,S,t,s,x,b;
      b:= 2^(n/2);
      L:= sort(convert(2^n,base,10));
      S:= map(t -> rhs(op(t)), [msolve(X^2=2^n,9)]);
      for t from floor(10^((nops(L)-1)/2)/9) to floor(10^(nops(L)/2)/9) do
        for s in S do
           x:= 9*t+s;
           if x = b then next fi;
           if sort(convert(x^2,base,10))=L then return true fi;
      od od;
      false
    end proc:
    select(filter, [seq(i,i=2..58,2)]); # Robert Israel, Aug 21 2020
  • Python
    from math import isqrt
    def ok(n, verbose=True):
        s = str(2**n)
        L, target, hi = len(s), sorted(s), int("".join(sorted(s, reverse=True)))
        if '0' not in s: lo = int("".join(target))
        else:
            lownzd, targetcopy = min(set(s) - {'0'}), target[:]
            targetcopy.remove(lownzd)
            rest = "".join(targetcopy)
            lo = int(lownzd + rest)
        for r in range(isqrt(lo), isqrt(hi)+1):
            rr = r*r
            if sorted(str(rr)) == target:
                brr = bin(rr)[2:]
                if brr != '1' + '0'*(len(brr)-1):
                    if verbose: print(f"2^{n}, {r}^2")
                    return r
        return 0
    print(list(filter(ok, range(2, 73, 2)))) # Michael S. Branicky, Aug 10 2021

Extensions

56 and 58 added by Robert Israel, Aug 21 2020
a(23)-(68) from Chai Wah Wu, Aug 21 2020
Showing 1-3 of 3 results.