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.

Previous Showing 21-30 of 51 results. Next

A246278 Prime shift array: Square array read by antidiagonals: A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 15, 25, 7, 10, 27, 35, 49, 11, 12, 21, 125, 77, 121, 13, 14, 45, 55, 343, 143, 169, 17, 16, 33, 175, 91, 1331, 221, 289, 19, 18, 81, 65, 539, 187, 2197, 323, 361, 23, 20, 75, 625, 119, 1573, 247, 4913, 437, 529, 29, 22, 63, 245, 2401, 209, 2873, 391, 6859, 667, 841, 31
Offset: 2

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
This array can be obtained by taking every second column from array A242378, starting from its column 2.
Permutation of natural numbers larger than 1.
The terms on row n are all divisible by n-th prime, A000040(n).
Each column is strictly growing, and the terms in the same column have the same prime signature.
A055396(n) gives the row number of row where n occurs,
and A246277(n) gives its column number, both starting from 1.
From Antti Karttunen, Jan 03 2015: (Start)
A252759(n) gives their sum minus one, i.e. the Manhattan distance of n from the top left corner.
If we assume here that a(1) = 1 (but which is not explicitly included because outside of the array), then A252752 gives the inverse permutation. See also A246276.
(End)

Examples

			The top left corner of the array:
   2,     4,     6,     8,    10,    12,    14,    16,    18, ...
   3,     9,    15,    27,    21,    45,    33,    81,    75, ...
   5,    25,    35,   125,    55,   175,    65,   625,   245, ...
   7,    49,    77,   343,    91,   539,   119,  2401,   847, ...
  11,   121,   143,  1331,   187,  1573,   209, 14641,  1859, ...
  13,   169,   221,  2197,   247,  2873,   299, 28561,  3757, ...
		

Crossrefs

First row: A005843 (the even numbers), from 2 onward.
Row 2: A249734, Row 3: A249827.
Column 1: A000040 (primes), Column 2: A001248 (squares of primes), Column 3: A006094 (products of two successive primes), Column 4: A030078 (cubes of primes).
Transpose: A246279.
Inverse permutation: A252752.
One more than A246275.
Arrays obtained by applying a particular function (given in parentheses) to the entries of this array. Cases where the columns grow monotonically are indicated with *: A249822 (A078898), A253551 (* A156552), A253561 (* A122111), A341605 (A017665), A341606 (A017666), A341607 (A006530 o A017666), A341608 (A341524), A341626 (A341526), A341627 (A341527), A341628 (A006530 o A341527), A342674 (A341530), A344027 (* A003415, arithmetic derivative), A355924 (A342671), A355925 (A009194), A355926 (A355442), A355927 (* sigma), A356155 (* A258851), A372562 (A252748), A372563 (A286385), A378979 (* deficiency, A033879), A379008 (* (probably), A294898), A379010 (* A000010, Euler phi), A379011 (* A083254).
Cf. A329050 (subtable).

Programs

  • Mathematica
    f[p_?PrimeQ] := f[p] = Prime[PrimePi@ p + 1]; f[1] = 1; f[n_] := f[n] = Times @@ (f[First@ #]^Last@ # &) /@ FactorInteger@ n; Block[{lim = 12}, Table[#[[n - k, k]], {n, 2, lim}, {k, n - 1, 1, -1}] &@ NestList[Map[f, #] &, Table[2 k, {k, lim}], lim]] // Flatten (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 *)
  • Scheme
    (define (A246278 n) (if (<= n 1) n (A246278bi (A002260 (- n 1)) (A004736 (- n 1))))) ;; Square array starts with offset=2, and we have also tacitly defined a(1) = 1 here.
    (define (A246278bi row col) (if (= 1 row) (* 2 col) (A003961 (A246278bi (- row 1) col))))

Formula

A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).
As a composition of other similar sequences:
a(n) = A122111(A253561(n)).
a(n) = A249818(A083221(n)).
For all n >= 1, a(n+1) = A005940(1+A253551(n)).
A(n, k) = A341606(n, k) * A355925(n, k). - Antti Karttunen, Jul 22 2022

Extensions

Starting offset of the linear sequence changed from 1 to 2, without affecting the column and row indices by Antti Karttunen, Jan 03 2015

A036798 Odd numbers m such that there exists an even number k < m with phi(k) = phi(m).

Original entry on oeis.org

105, 165, 195, 315, 495, 525, 585, 735, 825, 945, 975, 1155, 1365, 1485, 1575, 1755, 1785, 1815, 1995, 2145, 2205, 2415, 2475, 2535, 2625, 2805, 2835, 2925, 3003, 3045, 3135, 3255, 3315, 3465, 3675, 3705, 3795, 3885, 3927, 4095, 4125, 4305, 4389, 4455
Offset: 1

Views

Author

Keywords

Comments

These numbers m appear to satisfy cototient(m) > totient(m) or 2*phi(m) < m; they seem to be the missing terms mentioned in A067800. - Labos Elemer, May 08 2003
All elements in this sequence must have 2*phi(m) < m, but not the reverse. See A118700. - Franklin T. Adams-Watters, May 21 2006
The numbers of terms that do not exceed 10^k, for k = 3, 4, ..., are 11, 108, 1139, 11036, 111796, ... . Apparently, the asymptotic density of this sequence exists and equals 0.011... . - Amiram Eldar, Nov 21 2024

Crossrefs

Cf. A091495 (Odd, squarefree n such that n/phi(n) > 2).

Programs

  • Maple
    N:= 10^4: # to get all terms <= N
    PhiE:= map(numtheory:-phi, [seq(i,i=2..N,2)]):
    A:= NULL:
    for n from 1 to N by 2 do
    t:= numtheory:-phi(n);
    if 2*t < n and member(t, PhiE[1..(n-1)/2]) then A:= A,n fi;
    od:
    A; # Robert Israel, Jan 06 2017
  • PARI
    is(m) = m%2 && #select(k -> !(k%2) && k < m, invphi(eulerphi(m))) > 0; \\ Amiram Eldar, Nov 21 2024, using Max Alekseyev's invphi.gp

A054741 Numbers m such that totient(m) < cototient(m).

Original entry on oeis.org

6, 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 105, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 130, 132, 134, 136
Offset: 1

Views

Author

Labos Elemer, Apr 26 2000

Keywords

Comments

For powers of 2, the two function values are equal.
Numbers m such that m/phi(m) > 2. - Charles R Greathouse IV, Sep 13 2013
Numbers m such that A173557(m)/A007947(m) < 1/2. - Antti Karttunen, Jan 05 2019
Numbers m such that there are powers of m that are abundant. This follows from abundancy and totient being multiplicative, with the abundancy for prime p of p^k being asymptotically p/(p-1) as k -> oo; given that p/(p-1) = p^k/phi(p^k) for k >= 1. - Peter Munn, Nov 24 2020

Examples

			For m = 20, phi(20) = 8, cototient(20) = 20 - phi(20) = 12, 8 = phi(20) < 20-phi(20) = 12; for m = 21, the opposite holds: phi = 12, 21-phi = 8.
		

Crossrefs

A177712 is a subsequence. Complement: A115405.
Positions of negative terms in A083254.
Cf. A323170 (characteristic function).
Complement of A000079\{1} within A119432.

Programs

Formula

m such that A000010(m) < A051953(m).
a(n) seems to be asymptotic to c*n with c=1.9566...... - Benoit Cloitre, Oct 20 2002 [It is an old theorem that a(n) ~ cn for some c, for any sequence of the form "m/phi(m) > k". - Charles R Greathouse IV, May 28 2015] [c is in the interval (1.9540, 1.9562) (Kobayashi, 2016). - Amiram Eldar, Feb 14 2021]

Extensions

Erroneous comment removed by Antti Karttunen, Jan 05 2019

A297114 Möbius transform of A294898, where A294898 is deficiency minus binary weight.

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, -2, 7, -4, 9, -2, 0, 0, 14, -6, 15, -4, 4, -2, 18, -8, 14, -2, 7, -4, 24, -14, 25, 0, 9, -2, 14, -12, 33, -2, 9, -8, 37, -18, 38, -4, 3, -2, 41, -16, 35, -10, 12, -4, 48, -18, 24, -8, 15, -2, 53, -28, 55, -2, 6, 0, 33, -26, 63, -4, 21, -22, 66, -24, 69, -2, 6, -4, 44, -30, 73, -16, 28, -2
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &], {n, 82}] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A297114(n) = sumdiv(n,d,moebius(n/d)*(A005187(d)-sigma(d)));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A294898(d).
a(n) = A297111(n) - n.
a(n) = A297117(n) - A051953(n).
a(n) = A083254(n) - A297115(n).
a(2n) = A083254(2n) = A378986(n) = -2*A176095(n).
a(n) = A294898(n) - A317844(n).

A297115 Möbius transform of A000120, binary weight of n.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, -1, 0, 3, 0, 1, 0, 2, 0, 3, 0, 4, 0, -2, 0, -1, 0, 2, 0, 0, 0, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 4, 0, 4, 0, 3, 0, -2, 0, 2, 0, -2, 0, 3, 0, 2, 0, -1, 0, -1, 0, 4, 0, -1, 0, 3, 0, 1, 0, 0, 0, 3, 0, 0, 0, -1, 0, 2, 0, 2, 0, 2, 0, 3, 0, 4, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Cf. A000120, A008683, A083254, A297114, A297116 (odd bisection), A297117.

Programs

  • PARI
    A297115(n) = sumdiv(n,d,moebius(n/d)*hammingweight(d));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A000120(d).
a(n) = A083254(n) - A297114(n).
a(2n) = 0.

A326140 a(n) = gcd(A318878(n), A318879(n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 6, 1, 5, 2, 10, 2, 12, 2, 6, 1, 16, 1, 18, 2, 10, 2, 22, 2, 19, 2, 14, 6, 28, 6, 30, 1, 18, 2, 22, 1, 36, 2, 22, 2, 40, 2, 42, 2, 12, 2, 46, 2, 41, 1, 30, 6, 52, 2, 38, 2, 34, 2, 58, 6, 60, 2, 22, 1, 46, 6, 66, 2, 42, 2, 70, 1, 72, 2, 26, 6, 58, 2, 78, 2, 41, 2, 82, 2, 62, 2, 54, 2, 88, 6, 70, 2, 58, 2
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Crossrefs

Programs

  • PARI
    A326140(n) = { my(t=0, u=0); fordiv(n,d, d -= 2*eulerphi(d); if(d<0, t -= d, u += d)); gcd(t,u); };
    
  • PARI
    A318878(n) = sumdiv(n,d,d=(2*eulerphi(d))-d; (d>0)*d);
    A318879(n) = sumdiv(n,d,d=d-(2*eulerphi(d)); (d>0)*d);
    A326140(n) = gcd(A318878(n), A318879(n));

A318879 a(n) = Sum_{d|n} [d-(2*phi(d)) > 0]*(d-(2*phi(d))).

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 6, 0, 2, 0, 0, 0, 8, 0, 6, 0, 2, 0, 14, 0, 2, 0, 6, 0, 18, 0, 0, 0, 2, 0, 24, 0, 2, 0, 14, 0, 22, 0, 6, 0, 2, 0, 30, 0, 12, 0, 6, 0, 26, 0, 14, 0, 2, 0, 54, 0, 2, 0, 0, 0, 30, 0, 6, 0, 26, 0, 56, 0, 2, 0, 6, 0, 34, 0, 30, 0, 2, 0, 66, 0, 2, 0, 14, 0, 66, 0, 6, 0, 2, 0, 62, 0, 16, 0, 36, 0, 42, 0, 14, 9
Offset: 1

Views

Author

Antti Karttunen, Sep 05 2018

Keywords

Examples

			n = 105 has divisors [1, 3, 5, 7, 15, 21, 35, 105]. When A083254 is applied to them, we obtain [1, 1, 3, 5, 1, 3, 13, -9]. Summing the negative numbers present, and negating, we get a(105) = -(-9) = 9.
		

Crossrefs

Programs

  • PARI
    A318879(n) = sumdiv(n,d,d=d-(2*eulerphi(d)); (d>0)*d);

Formula

a(n) = -Sum_{d|n} [A083254(d) < 0]*A083254(d), where A083254(n) = 2*phi(n) - n, and [ ] are the Iverson brackets.
a(n) = A318878(n) - A033879(n).

A083255 Odd composite numbers k such that cototient(k) - phi(k) = k - 2*phi(k) is an odd prime.

Original entry on oeis.org

165, 195, 5187, 5865, 7395, 10005, 15045, 16215, 21165, 22695, 27285, 37995, 42585, 44115, 50235, 57885, 59415, 60945, 64005, 310845, 346035, 347565, 486795, 635205, 707115, 890445, 979455, 994755, 1049835, 1070535, 1078815, 1083585, 1121745
Offset: 1

Views

Author

Labos Elemer, May 08 2003

Keywords

Comments

Quite a number of terms are divisible by 3*5*17 = 255.

Examples

			m = 17425605 = 3*5*23*53*953 is a term since cototient(m) - phi(m) = 9712901 - 8712704 = 197 is an odd prime.
		

Crossrefs

Programs

  • Mathematica
    Do[s=EulerPhi[n]; c=n-s; If[Greater[c, s]&&PrimeQ[c-s]&&OddQ[c-s]&&!PrimeQ[n], Print[{n, c-s, n/255}]], {n, 1, 10000000}]

A297159 a(n) = 3*n - 2*phi(n) - sigma(n); Difference between the deficiency of n and its Moebius-transform.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 1, 6, 5, 1, 1, 3, 1, 2, 7, 10, 1, -4, 4, 12, 5, 4, 1, 2, 1, 1, 11, 16, 9, -7, 1, 18, 13, -2, 1, 6, 1, 8, 9, 22, 1, -12, 6, 17, 17, 10, 1, 6, 13, 0, 19, 28, 1, -20, 1, 30, 13, 1, 15, 14, 1, 14, 23, 18, 1, -27, 1, 36, 21, 16, 15, 18, 1, -10, 14, 40, 1, -20, 19, 42, 29, 4, 1, -12, 17, 20, 31, 46, 21, -28, 1, 39, 21, 3, 1, 26
Offset: 1

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 3*n - 2*EulerPhi[n] - DivisorSigma[1, n]; Array[a, 100] (* Amiram Eldar, Dec 04 2023 *)
  • PARI
    A297159(n) = (3*n - 2*eulerphi(n) - sigma(n));
    
  • PARI
    A297159(n) = -sumdiv(n,d,(d
    				
  • Python
    from sympy import totient, divisor_sigma
    def a(n): return 3*n-2*totient(n)-divisor_sigma(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Mar 02 2018

Formula

a(n) = A033879(n) - A083254(n) = 3*n - 2*A000010(n) - A000203(n).
a(n) = -Sum_{d|n, dA008683(n/d)*A033879(d).
Sum_{k=1..n} a(k) = (3/2 - 6/Pi^2 - Pi^2/12) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 04 2023

A318442 a(n) = Sum_{d|n} [moebius(n/d) < 0]*A033879(d).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 2, 5, 1, 1, 1, 7, 6, 1, 1, 5, 1, 3, 8, 11, 1, -3, 4, 13, 5, 5, 1, 9, 1, 1, 12, 17, 10, -7, 1, 19, 14, -1, 1, 15, 1, 9, 11, 23, 1, -11, 6, 21, 18, 11, 1, 11, 14, 1, 20, 29, 1, -17, 1, 31, 15, 1, 16, 27, 1, 15, 24, 29, 1, -31, 1, 37, 25, 17, 16, 33, 1, -9, 14, 41, 1, -15, 20, 43, 30, 5, 1, -1, 18, 21, 32, 47, 22, -27, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Programs

  • PARI
    A318442(n) = sumdiv(n,d,(-1==moebius(n/d))*(d+d-sigma(d)));

Formula

a(n) = Sum_{d|n} [A008683(n/d) == 1]*A033879(d).
a(n) = A318320(n) - A318326(n).
A083254(n) = A318441(n) - a(n).
Previous Showing 21-30 of 51 results. Next