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.
%I A321513 #38 Nov 19 2018 20:59:31 %S A321513 5,10,15,17,21,34,42,51,63,65,68,85,102,119,130,136,153,170,187,195, %T A321513 204,221,238,255,257,260,273,325,341,390,455,514,520,546,585,650,682, %U A321513 715,771,780,819,845,910,975,1023,1025,1028,1040,1092,1105,1170,1235,1285 %N A321513 Numbers that are periodic in base 4, written in decimal, where the base-4 expansion contains at least two periods. %e A321513 The base-4 representation of 17 is 101, which is periodic when considering leading zeros, i.e., 0101, so 17 is a term of the sequence. %e A321513 The base-4 representation of 170 is 2222, which is periodic, so 170 is a term of the sequence. %e A321513 The base-4 representation of 1495 is 113113, which is periodic, so 1495 is a term of the sequence. %o A321513 (PARI) subvec(vec, pos, len) = my(w=[]); for(k=pos, pos+len-1, if(k > #vec, return(0), w=concat(w, vec[k]))); w %o A321513 is_perio(vec) = my(d=divisors(#vec), v=[], w=[]); for(x=2, #d-1, v=subvec(vec, 1, d[x]); forstep(y=1, #vec, d[x], w=subvec(vec, y, d[x]); if(w!=v, break, if(y+d[x] >= #vec, return(1))))); 0 %o A321513 is(n) = my(d=digits(n, 4), z=[]); if(#d < 2, return(0)); if(vecmin(d)==vecmax(d), return(1)); while(#z <= #d, if(is_perio(concat(z, d)), return(1)); z=concat(z, [0])); 0 %o A321513 (PARI) is(n, b=4) = for (w=1, oo, my (d=digits(n, b^w)); if (#d<=1, return (0), #Set(d)==1, return (1))) \\ _Rémy Sigrist_, Nov 16 2018 %Y A321513 Cf. A007090, A242139. %K A321513 nonn,base %O A321513 1,1 %A A321513 _Felix Fröhlich_, Nov 11 2018