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

A246422 Numbers in which cubes may end (in base 10).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 17, 19, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 36, 37, 39, 41, 43, 44, 47, 48, 49, 51, 52, 53, 56, 57, 59, 61, 63, 64, 67, 68, 69, 71, 72, 73, 75, 76, 77, 79, 81, 83, 84, 87, 88, 89, 91, 92, 93, 96, 97, 99, 101, 103, 104, 107, 109, 111, 112, 113, 117
Offset: 1

Views

Author

Derek Orr, Aug 25 2014

Keywords

Examples

			33 is a member because 77^3 = 456533 is a cube ending in 33.
		

Crossrefs

Programs

  • Mathematica
    Union@Flatten@Table[Mod[i^3, 10^n], {n, 3}, {i, 10^n}] (* Ivan Neretin, Aug 30 2015*)
  • PARI
    v=[];for(k=1,10^3,for(m=1,3, v=concat(v,k^3%10^m)));v=vecsort(v,,8)
    
  • PARI
    a=[]; for(m=1, 3, a=setunion(a, Set(vector(10^m, n, n^3)%10^m))); a
    
  • Python
    from itertools import count, islice
    from sympy import nthroot_mod
    def A246422_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:len(nthroot_mod(n,3,10**(len(str(n))))),count(max(startvalue,0)))
    A246422_list = list(islice(A246422_gen(),20)) # Chai Wah Wu, Feb 16 2023

Extensions

Corrected by Ivan Neretin, Mar 03 2016

A316347 a(n) = n^2 mod(10^m), where m is the number of digits in n (written in base 10).

Original entry on oeis.org

0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 21, 44, 69, 96, 25, 56, 89, 24, 61, 0, 41, 84, 29, 76, 25, 76, 29, 84, 41, 0, 61, 24, 89, 56, 25, 96, 69, 44, 21, 0, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 21, 44, 69, 96, 25, 56, 89, 24, 61, 0, 41, 84, 29
Offset: 0

Views

Author

Christopher D Chamness, Jun 29 2018

Keywords

Comments

The set of the terms is the same as that of A238712.

Examples

			n = 13 has 2 digits in base 10, thus a(13) = 169 mod 100 = 69.
		

Crossrefs

Cf. A238712.

Programs

  • PARI
    a(n) = n^2 % 10 ^ #digits(n) \\ David A. Corneth, Jun 30 2018
    
  • Perl
    my $mod = 10;
    foreach my $i(0..10000) {
         print "$i " . (($i * $i) % $mod) . "\n";
         if (length($i + 1) > length($i)) { $mod *= 10; }
    } # Georg Fischer, Jan 16 2019
  • Python
    i=0
    while True:
         m=i
         j=i**2
         l=0
         while True:
              m=m//10
              l+=1
              if m==0:
                   break
         mod_num = 10**l
         print(j%mod_num)
         i+=1
    

A246448 Numbers n such that a square will never end in the digits of n.

Original entry on oeis.org

2, 3, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 82, 83, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Derek Orr, Aug 26 2014

Keywords

Comments

Complement of A238712.

Examples

			No square will ever end in a 2, thus 2 is a member of this sequence.
		

Crossrefs

Cf. A238712.

Programs

  • PARI
    b(n)=v=[];for(k=10^(n-1),10^n,v=concat(v,k^2%10^n));v=vecsort(v,,8);v
    for(n=1,500,d=digits(n);if(!vecsearch(b(#d),n),print1(n,", ")))

A380428 Numbers k for which nonnegative integers x and y exist such that k is the concatenation of x and y as well as k = (x + y)^2.

Original entry on oeis.org

81, 100, 2025, 3025, 88209, 494209, 4941729, 7441984, 24502500, 25502500, 52881984, 60481729, 300814336, 493817284, 6049417284, 6832014336, 20408122449, 21948126201, 33058148761, 35010152100, 43470165025, 101558217124, 108878221089, 123448227904, 127194229449, 152344237969
Offset: 1

Views

Author

Felix Huber, Jan 25 2025

Keywords

Comments

Subsequence of A000290.
From David A. Corneth, Apr 26 2025: (Start)
If y has q digits then a term m is of the form (x + y) = 10^q * x + y. Choosing some y we can solve for x (the equation is a quadratic with respect to x) and see if it produces a term.
y comes from A238712.
The sequence is infinite; it contains (25*100^i +- 5*10^i)^2 = concat(25*100^i +- 5*10^i, 25*100^i) for all i >= 0.
Neither x nor y can have a leading 0. (End)

Examples

			2025 is in the sequence because (20 + 25)^2 = 2025.
100 is in the sequence because (10 + 0)^2 = 100.
88209 is in the sequence because (88 + 209)^2 = 88209.
From _David A. Corneth_, Apr 26 2025: (Start)
9801 is not in the sequence even though (98 + 01)^2 = 9801 but 01 has a leading 0 which is disallowed.
If a term m ends in y = 209 where y has three digits we have 10^3*x + y = (x + y)^2. Solving for x gives x = 88 or x = 494 corresponding to terms 88209 and 494209. (End)
		

Crossrefs

Programs

  • Maple
    A380428:=proc(n)
        option remember;
        local a,i,k,x,y;
        if n=1 then
            81
        elif n=2 then
            100
        else
            for a from isqrt(procname(n-1))+1 do
                k:=length(a^2);
                for i to k-1 do
                    x:=floor(a^2/10^i);
                    y:=a^2-x*10^i;
                    if x+y=a and length(x)+length(y)=k then
                        return a^2
                    fi
                od
            od
        fi;
    end proc;
    seq(A380428(n),n=1..26);
Showing 1-4 of 4 results.