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.

A030678 Smallest nontrivial extension of n-th palindrome which is a cube.

This page as a plain text file.
%I A030678 #10 Dec 25 2018 22:24:05
%S A030678 125,27,343,4096,512,64,729,8000,9261,110592,226981,3375,4410944,
%T A030678 551368,6644672,778688,884736,9938375,101194696,111284641,12167,
%U A030678 13144256,14172488,151419437,16194277,17173512,1815848,191102976
%N A030678 Smallest nontrivial extension of n-th palindrome which is a cube.
%H A030678 Robert Israel, <a href="/A030678/b030678.txt">Table of n, a(n) for n = 1..10000</a>
%F A030678 a(n) = A030668(A002113(n+1)) = A030679(n)^3. - _Robert Israel_, Dec 25 2018
%p A030678 N:= 3: # to get extensions of all palindromes of <= N digits
%p A030678 f:= proc(n) local d,x;
%p A030678   for d from 1 do
%p A030678     x:= ceil((n*10^d)^(1/3));
%p A030678     if x^3 < (n+1)*10^d then return x^3 fi
%p A030678   od
%p A030678 end proc:
%p A030678 digrev:= proc(n) local i,L;
%p A030678   L:= convert(n,base,10);
%p A030678   add(L[-i]*10^(i-1),i=1..nops(L))
%p A030678 end proc:
%p A030678 Res:= seq(f(i),i=1..9):
%p A030678 for d from 2 to N do
%p A030678 if d::even then
%p A030678     m:= d/2;
%p A030678     Res:= Res, seq(f(n*10^m + digrev(n)), n=10^(m-1)..10^m-1);
%p A030678 else
%p A030678     m:= (d-1)/2;
%p A030678     Res:= Res, seq(seq(f(n*10^(m+1)+y*10^m+digrev(n)), y=0..9), n=10^(m-1)..10^m-1)
%p A030678 fi
%p A030678 od:
%p A030678 Res; # _Robert Israel_, Dec 25 2018
%Y A030678 Cf. A002113, A030668, A030679.
%K A030678 nonn,base
%O A030678 1,1
%A A030678 _Patrick De Geest_