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 A319351 #7 Sep 26 2018 16:24:09 %S A319351 1,2,3,4,3,5,6,7,6,8,3,9,3,10,11,12,6,13,3,14,15,16,6,17,6,18,19,20,3, %T A319351 21,22,23,24,25,26,27,3,28,29,30,6,31,19,32,33,34,6,35,36,37,38,39,3, %U A319351 40,41,42,43,44,3,45,3,46,47,48,49,50,3,51,52,53,6,54,55,56,57,58,59,60,6,61,36,62,3,63,64,65,66,67,55,68,69,70,71,72,73,74,6,75,76,77,3,78,6 %N A319351 Filter sequence which records the number of cyclotomic cosets of 2 mod p^k for powers of odd primes p, and for any other number assigns a unique number. %C A319351 All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to the number of cyclotomic cosets of 2 mod p^k, while all other numbers occur in singular equivalence classes of their own. %C A319351 Restricted growth sequence transform of function f defined as f(n) = A006694((n-1)/2) when n is an odd prime power > 1, otherwise -n. %C A319351 For all i, j: a(i) = a(j) => A305976(i) = A305976(j). (See also A305975). %H A319351 Antti Karttunen, <a href="/A319351/b319351.txt">Table of n, a(n) for n = 1..100000</a> %e A319351 a(7) = a(9) = a(17) = a(23) = a(25) = a(41) = ... because n = 7, 9, 17, 23, 25, 41, ... are such powers of odd primes for which A006694((n-1)/2) = 4. %o A319351 (PARI) %o A319351 up_to = 100000; %o A319351 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; }; %o A319351 A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694 %o A319351 A319351aux(n) = if((n<=2)||!(n%2)||!isprimepower(n),n,-(A006694((n-1)/2))); %o A319351 v319351 = rgs_transform(vector(up_to,n,A319351aux(n))); %o A319351 A319351(n) = v319351[n]; %Y A319351 Cf. A001917, A006694, A286573, A305801, A319350. %K A319351 nonn %O A319351 1,2 %A A319351 _Antti Karttunen_, Sep 26 2018