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.

A077743 Smallest cube ending in n, or 0 if no such cube exists.

Original entry on oeis.org

1, 512, 343, 64, 125, 216, 27, 8, 729, 0, 357911, 512, 4913, 0, 0, 216, 389017, 0, 59319, 0, 68921, 0, 103823, 13824, 125, 0, 27, 1728, 729, 0, 1331, 5832, 456533, 0, 0, 97336, 35937, 0, 493039, 0, 531441, 0, 343, 2744, 0, 0, 250047, 10648, 117649, 0, 132651
Offset: 1

Views

Author

Amarnath Murthy, Nov 20 2002

Keywords

Examples

			a(1) = 4913 = 17^3, a(10) = 0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,r,x;
      m:= 10^(ilog10(n)+1);
      r:= [msolve(x^3=n,m)];
      if r = [] then 0 else min(map(t -> rhs(op(t)),r))^3 fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 05 2023

Formula

a(m*10^(3k+1)) = a(m*10^(3k+2)) = 0.

Extensions

More terms from Sascha Kurz, Jan 07 2003

A077744 Smallest number whose cube ends in n, or 0 if no such number exists. a(n) = A077743(n)^(1/3).

Original entry on oeis.org

1, 8, 7, 4, 5, 6, 3, 2, 9, 0, 71, 8, 17, 0, 0, 6, 73, 0, 39, 0, 41, 0, 47, 24, 5, 0, 3, 12, 9, 0, 11, 18, 77, 0, 0, 46, 33, 0, 79, 0, 81, 0, 7, 14, 0, 0, 63, 22, 49, 0, 51, 28, 37, 0, 0, 36, 93, 0, 19, 0, 21, 0, 67, 4, 0, 0, 23, 32, 89, 0, 91, 38, 97, 0, 15, 26, 53, 0, 59, 0, 61, 0, 27, 44, 0
Offset: 1

Views

Author

Amarnath Murthy, Nov 20 2002

Keywords

Examples

			a(13) = 17, a(10) = 0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,r,x;
      m:= 10^(ilog10(n)+1);
      r:= [msolve(x^3=n,m)];
      if r = [] then 0 else min(map(t -> rhs(op(t)),r)) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 05 2023

Formula

a(m*10^(3*k+1)) = a(m*10^(3*k+2)) = 0.

Extensions

More terms from Sascha Kurz, Jan 07 2003

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

A246561 Least number k such that k concatenated with n is a cube, or 0 if no such k exists.

Original entry on oeis.org

133, 51, 34, 6, 12, 21, 2, 172, 72, 0, 3579, 5, 49, 0, 0, 2, 3890, 0, 593, 0, 689, 0, 1038, 138, 1, 0, 10927, 17, 7, 0, 13, 58, 4565, 0, 0, 973, 359, 0, 4930, 0, 5314, 0, 3, 27, 0, 0, 2500, 106, 1176, 0, 1326, 219, 506, 0, 0, 466, 8043, 0, 68, 0, 92, 0, 3007, 1574, 0, 0, 121, 327, 7049, 0, 7535, 548, 9126, 0, 33
Offset: 1

Views

Author

Derek Orr, Aug 29 2014

Keywords

Comments

a(n) = 0 if and only if n is in A246449.

Examples

			512 is the smallest cube ending with digit 2, so a(2) = 51.
		

Crossrefs

Programs

  • PARI
    b(n)=v=[];for(k=10^(n-1),10^n,v=concat(v,k^3%10^n));v=vecsort(v,,8);v
    w=[];for(k=1,250,d=digits(k);if(vecsearch(b(#d),k),w=concat(w,k)));w=vecsort(w,,8);w;
    a(n)=if(!vecsearch(w,n),return(0));if(vecsearch(w,n),j=1;s=Str(n);while(!ispower(eval(concat(Str(j),s)),3),j++);return(j))
    vector(200,n,a(n))
    
  • Python
    from sympy import nthroot_mod
    def A246561(n): return 0 if len(l:=nthroot_mod(n,3,(m:=10**(len(str(n)))))) == 0 else int((min(x for x in l+[d+m for d in l] if x**3>=m)**3-n)//m) # Chai Wah Wu, Feb 16 2023

Extensions

a(27), a(29) and a(43) corrected by Chai Wah Wu, Feb 16 2023
Showing 1-4 of 4 results.