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.

A326189 Number of distinct nonnegative integers that are reachable from n with some nonempty combination of transitions x -> A032742(x) and x -> A302042(x).

This page as a plain text file.
%I A326189 #29 Aug 24 2019 11:57:01
%S A326189 0,1,1,2,1,2,1,3,2,2,1,3,1,2,2,4,1,3,1,3,4,2,1,4,2,2,4,3,1,3,1,5,4,2,
%T A326189 2,4,1,2,3,4,1,5,1,3,7,2,1,5,2,3,4,3,1,5,4,4,6,2,1,4,1,2,6,6,3,5,1,3,
%U A326189 6,3,1,5,1,2,4,3,2,4,1,5,8,2,1,6,4,2,4,4,1,8,4,3,9,2,3,6,1,3,6,4,1,5,1,4,7
%N A326189 Number of distinct nonnegative integers that are reachable from n with some nonempty combination of transitions x -> A032742(x) and x -> A302042(x).
%C A326189 Number of distinct numbers > 1 in the directed acyclic graph formed by edge relations x -> A032742(x) and x -> A302042(x), where n is the unique root of the graph.
%H A326189 Antti Karttunen, <a href="/A326189/b326189.txt">Table of n, a(n) for n = 1..65537</a>
%F A326189 a(p) = 1 for all primes p.
%F A326189 a(n) >= A326191(n) >= max(A001222(n),A253557(n)) >= min(A001222(n),A253557(n)) >= A326190(n).
%e A326189 The directed acyclic graph whose unique root is 153 (illustrated below), spans the following seven numbers [1, 5, 17, 25, 51, 75, 153], as A032742(153) = 51, A302042(153) = 75, A032742(51) = 17, A302042(51) = 25, A032742(75) = 25, A302042(75) = 15, A032742(25) = A302042(25) = 5, and A032742(17) = A302042(17) = A032742(5) = A302042(5) = 1. We exclude the root 153 from the count of numbers that are reached, thus a(153) = 6. (Equally, we can include 153, but exclude 1).
%e A326189 .
%e A326189         153
%e A326189        /  \
%e A326189       /    \
%e A326189      51    75
%e A326189      / \  /  \
%e A326189     /   17    \
%e A326189     \    |    /
%e A326189      \   1   /
%e A326189       \     /
%e A326189        \   /
%e A326189         25
%e A326189          |
%e A326189          5
%e A326189          |
%e A326189          1
%o A326189 (PARI)
%o A326189 up_to = 65537;
%o A326189 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
%o A326189 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
%o A326189 A032742(n) = (n/A020639(n));
%o A326189 v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
%o A326189 A078898(n) = v078898[n];
%o A326189 A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p));
%o A326189 A326189aux(n,distvals) = if(1==n,distvals,my(newdistvals=setunion([n],distvals),a=A032742(n), b=A302042(n)); newdistvals = A326189aux(a,newdistvals); if(a==b,newdistvals, A326189aux(b,newdistvals)));
%o A326189 A326189(n) = length(A326189aux(n,Set([])));
%Y A326189 Cf. A001222, A032742, A253557, A302042, A323888, A326075, A326139, A326190, A326191.
%Y A326189 Cf. also A326196.
%K A326189 nonn
%O A326189 1,4
%A A326189 _Antti Karttunen_, Aug 23 2019