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-9 of 9 results.

A347098 a(1) = 1; a(n) = -Sum_{d|n, d < n} A336853(n/d) * a(d), where A336853(n) = A003961(n) - n.

Original entry on oeis.org

1, -1, -2, -4, -2, -5, -4, -10, -12, -7, -2, -1, -4, -11, -12, -16, -2, -1, -4, -7, -18, -13, -6, 42, -20, -17, -42, -5, -2, 21, -6, -4, -24, -19, -26, 106, -4, -23, -30, 38, -2, 45, -4, -25, -10, -29, -6, 196, -56, -17, -36, -23, -6, 123, -28, 82, -42, -31, -2, 225, -6, -37, 4, 80, -38, 15, -4, -43, -52, 39, -2, 413
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Comments

Dirichlet inverse of the pointwise sum of A336853 and A063524 (1, 0, 0, 0, ...).

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; s[1] = 0; s[n_] := Times @@ f @@@ FactorInteger[n] - n; a[1] = 1; a[n_] := a[n] = -DivisorSum[n, a[#] * s[n/#] &, # < n &]; Array[a, 100] (* Amiram Eldar, Nov 27 2021 *)
  • PARI
    up_to = 16384;
    A336853(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)-n); };
    Aux347098(n) = if(1==n,n,A336853(n));
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA347098(n) = v347098[n];

Formula

a(1) = 1; and for n > 1, a(n) = -Sum_{d|n, d < n} A336853(n/d) * a(d).
For all n >= 1, a(A000040(n)) = -A001223(n).

A347099 a(1) = 2; and for n > 1, a(n) = A336853(n) + A347098(n).

Original entry on oeis.org

2, 0, 0, 1, 0, 4, 0, 9, 4, 4, 0, 32, 0, 8, 8, 49, 0, 56, 0, 36, 16, 4, 0, 153, 4, 8, 56, 66, 0, 96, 0, 207, 8, 4, 16, 295, 0, 8, 16, 187, 0, 168, 0, 48, 120, 12, 0, 553, 16, 80, 8, 78, 0, 444, 8, 323, 16, 4, 0, 480, 0, 12, 216, 745, 16, 144, 0, 60, 24, 200, 0, 1016, 0, 8, 152, 90, 16, 216, 0, 723, 472, 4, 0, 786, 8, 8, 8, 289
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Comments

Sum of {the pointwise sum of A336853 and A063524 (1, 0, 0, 0, ...)} and its Dirichlet inverse.
The first negative term is a(720) = -6306.

Crossrefs

Programs

  • PARI
    up_to = 16384;
    A336853(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)-n); };
    Aux347098(n) = if(1==n,n,A336853(n));
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA347098(n) = v347098[n];
    A347099(n) = if(1==n,2,A336853(n)+A347098(n));

Formula

a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A336853(d) * A347098(n/d).
For all n >= 1, a(A001248(n)) = A001223(n)^2.

A048674 Fixed points of A048673 and A064216: Numbers n such that if n = product_{k >= 1} (p_k)^(c_k), then Product_{k >= 1} (p_{k+1})^(c_k) = (2*n)-1, where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

1, 2, 3, 25, 26, 33, 93, 1034, 970225, 8550146, 325422273, 414690595, 1864797542, 2438037206
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Equally: after 1, numbers n such that, if the prime factorization of 2n-1 = Product_{k >= 1} (p_k)^(c_k) then Product_{k >= 1} (p_{k-1})^(c_k) = n.
Factorization of the initial terms: 1, 2, 3, 5^2, 2*13, 3*11, 3*31, 2*11*47, 5^2*197^2, 2*11*47*8269, 3*11*797*12373, 5*11^2*433*1583, 2*23*59*101*6803, 2*11*53*1201*1741.
The only 3-cycle of permutation A048673 in range 1 .. 402653184 is (2821 3460 5639).
For 2-cycles, take setwise difference of A245449 and this sequence.
Numbers k for which A336853(k) = k-1. - Antti Karttunen, Nov 26 2021

Examples

			25 is present, as 2*25 - 1 = 49 = p_4^2, and p_3^2 = 5*5 = 25.
26 is present, as 2*26 - 1 = 51 = 3*17 = p_2 * p_8, and p_1 * p_7 = 2*13 = 26.
Alternatively, as 26 = 2*13 = p_1 * p_7, and ((p_2 * p_8)+1)/2 = ((3*17)+1)/2 = 26 also, thus 26 is present.
		

Crossrefs

Fixed points of permutation pair A048673/A064216.
Positions of zeros in A349573.
Subsequence of the following sequences: A245449, A269860, A319630, A349622, A378980 (see also A379216).
This sequence is also obtained as a setwise difference of the following pairs of sequences: A246281 \ A246351, A246352 \ A246282, A246361 \ A246371, A246372 \ A246362.
Cf. also A348514 (fixed points of map A108228, similar to A048673).

Programs

  • Maple
    A048673 := n -> (A003961(n)+1)/2;
    A048674list := proc(upto_n) local b,i; b := [ ]; for i from 1 to upto_n do if(A048673(i) = i) then b := [ op(b), i ]; fi; od: RETURN(b); end;
  • Mathematica
    Join[{1}, Reap[For[n = 1, n < 10^7, n++, ff = FactorInteger[n]; If[Times @@ Power @@@ (NextPrime[ff[[All, 1]]]^ff[[All, 2]]) == 2 n - 1, Print[n]; Sow[n]]]][[2, 1]]] (* Jean-François Alcover, Mar 04 2016 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    isA048674(n) = ((n+n)==(1+A003961(n))); \\ Antti Karttunen, Nov 26 2021

Extensions

Entry revised and the names in Maple-code cleaned by Antti Karttunen, Aug 25 2014
Terms a(11) - a(14) added by Antti Karttunen, Sep 11-13 2014

A336852 a(n) = sigma(A003961(n)) - sigma(n).

Original entry on oeis.org

0, 1, 2, 6, 2, 12, 4, 25, 18, 14, 2, 50, 4, 24, 24, 90, 2, 85, 4, 62, 40, 20, 6, 180, 26, 30, 116, 100, 2, 120, 6, 301, 36, 26, 48, 312, 4, 36, 52, 230, 2, 192, 4, 98, 170, 48, 6, 602, 76, 135, 48, 136, 6, 504, 40, 360, 64, 38, 2, 456, 6, 56, 268, 966, 60, 192, 4, 134, 84, 240, 2, 1045, 6, 54, 218, 172, 72, 264, 4, 782
Offset: 1

Views

Author

Antti Karttunen, Aug 05 2020

Keywords

Comments

Inverse Möbius transform of A336853(n) = (A003961(n) - n).

Crossrefs

Cf. A001105 (positions of odd terms), A001359 (positions of 2's).

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A336852(n) = (sigma(A003961(n)) - sigma(n));
    
  • PARI
    A336852(n) = sumdiv(n,d,A003961(d)-d);

Formula

a(n) = Sum_{d|n} (A003961(d)-d).
a(n) = A003973(n) - A000203(n) = A000203(A003961(n)) - A000203(n).
a(n) = A336851(n) + A286385(n).

A337549 a(n) = A003972(n) - n.

Original entry on oeis.org

0, 0, 1, 2, 1, 2, 3, 10, 11, 2, 1, 12, 3, 6, 9, 38, 1, 22, 3, 16, 19, 2, 5, 48, 17, 6, 73, 32, 1, 18, 5, 130, 15, 2, 25, 84, 3, 6, 25, 68, 1, 38, 3, 28, 75, 10, 5, 168, 61, 34, 21, 44, 5, 146, 17, 124, 31, 2, 1, 84, 5, 10, 137, 422, 31, 30, 3, 40, 43, 50, 1, 288, 5, 6, 93, 56, 43, 50, 3, 244, 419, 2, 5, 156, 23, 6, 33
Offset: 1

Views

Author

Antti Karttunen, Sep 21 2020

Keywords

Comments

Möbius transform of A286385.

Crossrefs

Programs

  • PARI
    A003972(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); eulerphi(factorback(f)); };
    A337549(n) = (A003972(n) - n);

Formula

a(n) = A003972(n) - n.

A336855 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), for all i, j >= 1, where f(p) = p-nextprime(p) for primes p, and f(n) = n for all other numbers.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 3, 10, 6, 11, 12, 13, 3, 14, 6, 15, 16, 17, 18, 19, 20, 21, 22, 23, 3, 24, 18, 25, 26, 27, 28, 29, 6, 30, 31, 32, 3, 33, 6, 34, 35, 36, 18, 37, 38, 39, 40, 41, 18, 42, 43, 44, 45, 46, 3, 47, 18, 48, 49, 50, 51, 52, 6, 53, 54, 55, 3, 56, 18, 57, 58, 59, 60, 61, 6, 62, 63, 64, 18, 65, 66
Offset: 1

Views

Author

Antti Karttunen, Aug 09 2020

Keywords

Comments

Restricted growth sequence transform of function f defined as: f(n) = -{distance to the next larger prime} when n is a prime, otherwise f(n) = -n.
For all i, j:
a(i) = a(j) => A305801(i) = A305801(j),
a(i) = a(j) => A336852(i) = A336852(j),
a(i) = a(j) => A336853(i) = A336853(j).

Crossrefs

Cf. also A001359 (positions of 3's), A305801, A319704, A331304, A336852, A336853.

Programs

  • PARI
    up_to = 100000;
    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; };
    A336855aux(n) = if(isprime(n),n-nextprime(1+n),n);
    v336855 = rgs_transform(vector(up_to,n,A336855aux(n)));
    A336855(n) = v336855[n];

A347100 a(n) = phi(A003961(n)) - phi(n), where A003961 is the prime shift towards larger primes, and phi is Euler totient function.

Original entry on oeis.org

0, 1, 2, 4, 2, 6, 4, 14, 14, 8, 2, 20, 4, 14, 16, 46, 2, 34, 4, 28, 28, 14, 6, 64, 22, 20, 82, 48, 2, 40, 6, 146, 28, 20, 36, 108, 4, 26, 40, 92, 2, 68, 4, 52, 96, 34, 6, 200, 68, 64, 40, 72, 6, 182, 32, 156, 52, 32, 2, 128, 6, 42, 164, 454, 48, 76, 4, 76, 68, 96, 2, 336, 6, 44, 128, 96, 60, 104, 4, 292, 446, 44, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Comments

Möbius transform of A336853.

Crossrefs

Möbius transform of A336853.
Cf. also A346249, A347098.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; a[n_] := EulerPhi[Times @@ f @@@ FactorInteger[n]] - EulerPhi[n]; Array[a, 100] (* Amiram Eldar, Nov 27 2021 *)
  • PARI
    A347100(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (eulerphi(factorback(f))-eulerphi(n)); };
    
  • PARI
    A336853(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)-n); };
    A347100(n) = sumdiv(n,d,moebius(n/d)*A336853(d));

Formula

a(n) = A003972(n) - A000010(n).
a(n) = A337549(n) + A051953(n).
a(n) = Sum_{d|n} A008683(n/d) * A336853(d).
For all n >= 1, a(A000040(n)) = A001223(n).

A348937 a(n) = A003961(n) - A003415(n), where A003961 shifts the prime factorization of n one step towards larger primes, and A003415 gives the arithmetic derivative of n.

Original entry on oeis.org

1, 2, 4, 5, 6, 10, 10, 15, 19, 14, 12, 29, 16, 24, 27, 49, 18, 54, 22, 39, 45, 26, 28, 91, 39, 36, 98, 67, 30, 74, 36, 163, 51, 38, 65, 165, 40, 48, 69, 121, 42, 124, 46, 69, 136, 62, 52, 293, 107, 102, 75, 97, 58, 294, 75, 205, 93, 62, 60, 223, 66, 78, 224, 537, 101, 134, 70, 99, 119, 172, 72, 519, 78, 84, 190, 127
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f1[p_, e_] := e/p; f2[p_, e_] := NextPrime[p]^e; a[n_] := Times @@ f2 @@@ (f = FactorInteger[n]) - n * Plus @@ f1 @@@ f; Array[a, 100] (* Amiram Eldar, Nov 06 2021 *)
  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A348937(n) = (A003961(n) - A003415(n));

Formula

a(n) = A003961(n) - A003415(n).
a(n) = A336853(n) - A168036(n).
a(n) = A286385(n) + A343224(n).

A347378 a(n) = A250469(n) - n.

Original entry on oeis.org

0, 1, 2, 5, 2, 9, 4, 13, 16, 17, 2, 21, 4, 25, 20, 29, 2, 33, 4, 37, 34, 41, 6, 45, 24, 49, 38, 53, 2, 57, 6, 61, 52, 65, 42, 69, 4, 73, 56, 77, 2, 81, 4, 85, 70, 89, 6, 93, 72, 97, 74, 101, 6, 105, 36, 109, 88, 113, 2, 117, 6, 121, 92, 125, 54, 129, 4, 133, 106, 137, 2, 141, 6, 145, 110, 149, 66, 153, 4, 157, 124
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2021

Keywords

Crossrefs

Programs

Formula

a(n) = A250469(n) - n.
a(n) = n - A346476(n).
a(n) = A336853(n) - A280692(n).
For all n >= 1, a(A000040(n)) = A001223(n).
Showing 1-9 of 9 results.