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.

A117304 Numbers with an even number of digits such that the second half is twice the first half.

This page as a plain text file.
%I A117304 #16 Sep 28 2024 02:19:29
%S A117304 12,24,36,48,1020,1122,1224,1326,1428,1530,1632,1734,1836,1938,2040,
%T A117304 2142,2244,2346,2448,2550,2652,2754,2856,2958,3060,3162,3264,3366,
%U A117304 3468,3570,3672,3774,3876,3978,4080,4182,4284,4386,4488,4590,4692,4794,4896
%N A117304 Numbers with an even number of digits such that the second half is twice the first half.
%H A117304 Michael S. Branicky, <a href="/A117304/b117304.txt">Table of n, a(n) for n = 1..10000</a>
%F A117304 a(n) = (10^(k+1) + 2)*(n + (10^k-1)*5/9) where k=floor(log(n*9/4)/log(10)). - _Andrew Howroyd_, Sep 27 2024
%e A117304 1020 is in the sequence because 20 = 2*10.
%t A117304 s={};Do[id=IntegerDigits[n];d=Length[id] ;If[EvenQ[d]&&FromDigits[Drop[id,d/2]]==2FromDigits[Drop[id,-d/2]],AppendTo[s,n]],{n,10,4896}];s (* _James C. McMahon_, Sep 27 2024 *)
%o A117304 (Python)
%o A117304 from itertools import count, islice, takewhile
%o A117304 def agen():
%o A117304     for d in count(2, 2):
%o A117304         t = (int(str(k) + str(2*k)) for k in count(10**(d//2-1)))
%o A117304         yield from takewhile(lambda x: x < 10**d, t)
%o A117304 print(list(islice(agen(), 43))) # _Michael S. Branicky_, Dec 24 2021
%o A117304 (PARI) a(n)={my(k=10^logint(n*9\4,10)); (10*k + 2)*(n + (k-1)*5/9)} \\ _Andrew Howroyd_, Sep 27 2024
%Y A117304 Subsequence of A019550.
%K A117304 nonn,base,easy
%O A117304 1,1
%A A117304 Luc Stevens (lms022(AT)yahoo.com), Apr 26 2006