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.

A322808 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is a squarefree number > 2, and f(n) = A097246(n) for all other numbers.

This page as a plain text file.
%I A322808 #6 Dec 26 2018 21:36:12
%S A322808 1,2,3,4,3,3,3,5,6,3,3,7,3,3,3,7,3,8,3,9,3,3,3,10,11,3,9,12,3,3,3,10,
%T A322808 3,3,3,9,3,3,3,13,3,3,3,14,15,3,3,16,17,18,3,19,3,13,3,20,3,3,3,21,3,
%U A322808 3,22,16,3,3,3,23,3,3,3,13,3,3,12,24,3,3,3,21,15,3,3,25,3,3,3,26,3,27,3,28,3,3,3,29,3,30,31,12,3,3,3,32,3
%N A322808 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is a squarefree number > 2, and f(n) = A097246(n) for all other numbers.
%C A322808 For all i, j: a(i) = a(j) => A097249(i) = A097249(j).
%H A322808 Antti Karttunen, <a href="/A322808/b322808.txt">Table of n, a(n) for n = 1..65537</a>
%o A322808 (PARI)
%o A322808 up_to = 65537;
%o A322808 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 A322808 A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); };
%o A322808 A322808aux(n) = if((n>2)&&issquarefree(n),0,A097246(n));
%o A322808 v322808 = rgs_transform(vector(up_to,n,A322808aux(n)));
%o A322808 A322808(n) = v322808[n];
%Y A322808 Cf. A005117, A097246, A097249, A305980.
%K A322808 nonn
%O A322808 1,2
%A A322808 _Antti Karttunen_, Dec 26 2018