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.

Showing 1-3 of 3 results.

A355908 A335905(n) + A335906(n).

Original entry on oeis.org

0, 2, -2, 4, -6, 10, -14, 22, -32, 50, -74, 112, -168, 254, -380, 572, -858, 1288, -1932, 2900
Offset: 0

Views

Author

N. J. A. Sloane, Sep 19 2022

Keywords

Comments

This is also -2*A355907(n).

Crossrefs

A335904 Fully additive with a(2) = 0, and a(p) = 1+a(p-1)+a(p+1), for odd primes p.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 0, 2, 2, 4, 1, 4, 2, 3, 0, 3, 2, 5, 2, 3, 4, 6, 1, 4, 4, 3, 2, 6, 3, 4, 0, 5, 3, 4, 2, 8, 5, 5, 2, 6, 3, 8, 4, 4, 6, 8, 1, 4, 4, 4, 4, 8, 3, 6, 2, 6, 6, 10, 3, 8, 4, 4, 0, 6, 5, 9, 3, 7, 4, 7, 2, 11, 8, 5, 5, 6, 5, 8, 2, 4, 6, 10, 3, 5, 8, 7, 4, 9, 4, 6, 6, 5, 8, 7, 1, 6, 4, 6, 4, 9, 4, 9, 4, 5
Offset: 1

Views

Author

Antti Karttunen, Jun 29 2020

Keywords

Crossrefs

Programs

  • PARI
    A335904(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A335904(f[k,1]-1)+A335904(f[k,1]+1)))); };

Formula

Totally additive with a(2) = 0, and for odd primes p, a(p) = 1 + a(p-1) + a(p+1).
a(n) = A336118(n) + A087436(n).
For all n >= 1, a(A335915(n)) = A336118(n).
For all n >= 1, a(n) >= A335884(n) >= A335881(n) >= A335875(n) >= A335885(n).
For all n >= 0, a(3^n) = n.

A335906 Number of distinct integers encountered on all possible paths from n to any first encountered powers of 2 (that are included in the count), when using the transitions x -> x - (x/p) and x -> x + (x/p) in any order, where p is the largest prime dividing x.

Original entry on oeis.org

1, 1, 3, 1, 4, 3, 4, 1, 6, 4, 5, 3, 5, 4, 7, 1, 7, 6, 8, 4, 7, 5, 6, 3, 9, 5, 10, 4, 9, 7, 8, 1, 8, 7, 9, 6, 9, 8, 8, 4, 9, 7, 10, 5, 11, 6, 7, 3, 9, 9, 11, 5, 13, 10, 10, 4, 12, 9, 10, 7, 9, 8, 11, 1, 10, 8, 10, 7, 9, 9, 10, 6, 10, 9, 13, 8, 11, 8, 10, 4, 15, 9, 10, 7, 13, 10, 13, 5, 14, 11, 10, 6, 12, 7, 15, 3, 10, 9, 12, 9, 15, 11, 14, 5, 13
Offset: 1

Views

Author

Antti Karttunen, Jun 30 2020

Keywords

Examples

			From 9 one can reach with the transitions x -> A171462(x) (leftward arrow) and x -> A335876(x) (rightward arrow) the following six numbers, when one doesn't expand any power of 2 further:
       9
      / \
     6   12
    / \ / \
   4   8   16
thus a(9) = 6.
From 10 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following for numbers, when one doesn't expand any power of 2 further:
  10
   |\
   | \
   | 12
   | /\
   |/  \
   8   16
thus a(10) = 4.
From 15 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following seven numbers, when one doesn't expand any power of 2 further:
        15
       /  \
      /    \
    12<----18
    / \      \
   /   \      \
  8     16<----24
                \
                 \
                  32
thus a(15) = 7.
		

Crossrefs

Programs

  • PARI
    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));
    A335906(n) = { 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]; if(!A209229(u), newxs = setunion([A171462(u)],newxs); newxs = setunion([A335876(u)],newxs))); xs = newxs); };
Showing 1-3 of 3 results.