A355908 A335905(n) + A335906(n).
0, 2, -2, 4, -6, 10, -14, 22, -32, 50, -74, 112, -168, 254, -380, 572, -858, 1288, -1932, 2900
Offset: 0
Links
- Don Knuth, Ambidextrous Numbers, Preprint, September 2022.
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.
From 9 one can reach with the transitions x -> A171462(x) (leftward arrow) and x -> A335876(x) (rightward arrow) the following three numbers, when one doesn't expand any power of 2 (in this case, 4, 8 and 16, that are not included in the count) further: 9 / \ 6 12 / \ / \ (4) (8) (16) thus a(9) = 3. From 10 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following two numbers (10 & 12), when one doesn't expand any powers of 2 (8 and 16 in this case, not counted) further: 10 |\ | \ | 12 | /\ |/ \ (8) (16) thus a(10) = 2. For n = 9, the numbers encountered are 6, 9, 12, thus a(9) = 3. For n = 67, the numbers encountered are 48, 60, 66, 67, 68, 72, 96, thus a(67) = 7. For n = 105, the numbers encountered are 48, 72, 90, 96, 105, 108, 120, 144, 192, thus a(105) = 9.
A171462(n) = if(1==n,0,(n-(n/vecmax(factor(n)[, 1])))); A335876(n) = if(1==n,2,(n+(n/vecmax(factor(n)[, 1])))); A209229(n) = (n && !bitand(n,n-1)); A335905(n) = if(A209229(n),0,my(xs=Set([n]),allxs=xs,newxs,a,b,u); for(k=1,oo, newxs=Set([]); if(!#xs, return(#allxs)); allxs = setunion(allxs,xs); for(i=1,#xs,u = xs[i]; a = A171462(u); if(!A209229(a), newxs = setunion([a],newxs)); b = A335876(u); if(!A209229(b), newxs = setunion([b],newxs))); xs = newxs));
Comments