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.

A028822 Squares with digits in nonincreasing order.

Original entry on oeis.org

0, 1, 4, 9, 64, 81, 100, 400, 441, 841, 900, 961, 6400, 7744, 8100, 10000, 40000, 44100, 84100, 90000, 96100, 640000, 774400, 810000, 1000000, 4000000, 4410000, 8410000, 8874441, 9000000, 9610000, 9853321, 64000000, 77440000
Offset: 1

Views

Author

Keywords

Comments

From Robert G. Wilson v, Jan 02 2014: (Start)
If x is present so is 100x. The primitives are 0, 1, 4, 9, 64, 81, 441, 841, 961, 7744, 8874441, 9853321, 999887641, …, . = A062826. Their square roots are: 0, 1, 2, 3, 8, 9, 21, 29, 31, 88, 2979, 3139, 31621, …, . Are there no more primitives?
Number of terms less than 10^k, beginning with k=0: 1, 4, 6, 12, 15, 21, 24, 32, 35, 44, 47, 56, 59, 68, 71, 80, 83, 92, 95, …, .
Like all squares the ending digits can be 0, 1, 4, 5, 6 or 9. Here is the tally of the list of terms < 10^18: {0, 84}, {1, 8}, {4, 3}, {5, 0}, {6, 0}, {9, 1}. (End)

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Max[ Differences[ IntegerDigits[ n]]] < 1; Select[ Range[0, 9000]^2, fQ] (* Robert G. Wilson v, Jan 02 2014 *)
    Select[Range[0,10^4]^2,GreaterEqual@@IntegerDigits[#]&] (* Ray Chandler, Jan 05 2014 *)
  • PARI
    isA009996(n)=n=digits(n); for(i=2,#n,if(n[i]>n[i-1],return(0))); 1
    is(n)=issquare(n) && isA009996(n) \\ Charles R Greathouse IV, Jan 02 2014

Formula

For n > 1, a(n) = A062826(i) * 10^j for some i and j. - Charles R Greathouse IV, Jan 02 2014
a(n) = A028821(n)^2. - Ray Chandler, Jan 05 2014

Extensions

Better name from Robert G. Wilson v, Jan 02 2014

A028868 Primes that when squared give numbers with digits in nonascending order.

Original entry on oeis.org

2, 3, 29, 31
Offset: 1

Views

Author

Keywords

Comments

No other solutions below 2*10^9 (probably finite). - Dec 15 1999
No other solutions below 10^20. - David A. Corneth, Oct 28 2023, recomputed after a remark from Max Alekseyev, David A. Corneth, Aug 20 2024
Primes p such that p^2 is in A062826. - Max Alekseyev, Aug 18 2024

Examples

			From _David A. Corneth_, Oct 28 2023: (Start)
31 is in the sequence as 31 is prime and 31^2 = 961 which has its digits in nonascending order.
2979 is not in the sequence even though 2979^2 = 8874441 does have digits in nonascending order but 2979 = 3^2 * 331 is not prime. (End)
		

Crossrefs

Programs

  • PARI
    is(n) = my(d = digits(n^2)); d == vecsort(d,,4) && isprime(n) \\ David A. Corneth, Oct 28 2023
    
  • PARI
    \\ see link for a faster program

Extensions

Name clarified by Jon E. Schoenfield, Oct 27 2023

A355063 Perfect powers whose digits are in nonincreasing order and do not include 0.

Original entry on oeis.org

1, 4, 8, 9, 32, 64, 81, 441, 841, 961, 7744, 7776, 8874441, 9853321, 999887641
Offset: 1

Views

Author

Jon E. Schoenfield, Jun 16 2022

Keywords

Comments

a(16) > 10^45 if it exists. - Michael S. Branicky, Jun 19 2022

Crossrefs

Programs

  • Mathematica
    perfectPowerQ[n_] := n==1||GCD @@ FactorInteger[n][[All, 2]] > 1; (* A001597 *) Select[Range[10^5], perfectPowerQ[#] && Max[Differences[d=IntegerDigits[#]]]<1 && Count[d,0]==0&] (* Stefano Spezia, Jul 01 2025 *)
  • PARI
    isok(m) = if (ispower(m), my(d=digits(m)); vecmin(d) && (d == vecsort(d,,4))); \\ Michel Marcus, Jun 17 2022
  • Python
    from sympy import perfect_power as pp
    from itertools import count, islice, combinations_with_replacement as mc
    def agen():
        yield 1
        for d in count(1):
            nd = (int("".join(m)) for m in mc("987654321", d))
            yield from sorted(filter(pp, nd))
    print(list(islice(agen(), 14))) # Michael S. Branicky, Jun 16 2022
    
Showing 1-3 of 3 results.