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

A024816 Antisigma(n): Sum of the numbers less than n that do not divide n.

Original entry on oeis.org

0, 0, 2, 3, 9, 9, 20, 21, 32, 37, 54, 50, 77, 81, 96, 105, 135, 132, 170, 168, 199, 217, 252, 240, 294, 309, 338, 350, 405, 393, 464, 465, 513, 541, 582, 575, 665, 681, 724, 730, 819, 807, 902, 906, 957, 1009, 1080, 1052, 1168, 1182, 1254, 1280, 1377, 1365
Offset: 1

Views

Author

Paul Jobling (paul.jobling(AT)whitecross.com)

Keywords

Comments

a(n) is the sum of proper non-divisors of n, the row sum in triangle A173541. - Omar E. Pol, May 25 2010
a(n) is divisible by A000203(n) iff n is in A076617. - Bernard Schott, Apr 12 2022

Examples

			a(12)=50 as 5+7+8+9+10+11 = 50 (1,2,3,4,6 not included as they divide 12).
		

Crossrefs

Cf. A342344 (for a symmetric representation).

Programs

  • Haskell
    a024816 = sum . a173541_row  -- Reinhard Zumkeller, Feb 19 2014
    
  • Magma
    [n*(n+1) div 2- SumOfDivisors(n): n in [1..60]]; // Vincenzo Librandi, Dec 29 2015
    
  • Maple
    A024816 := proc(n)
        n*(n+1)/2-numtheory[sigma](n) ;
    end proc: # R. J. Mathar, Aug 03 2013
  • Mathematica
    Table[n(n + 1)/2 - DivisorSigma[1, n], {n, 55}] (* Robert G. Wilson v *)
    Table[Total[Complement[Range[n],Divisors[n]]],{n,60}] (* Harvey P. Dale, Sep 23 2012 *)
    With[{nn=60},#[[1]]-#[[2]]&/@Thread[{Accumulate[Range[nn]],DivisorSigma[ 1,Range[nn]]}]] (* Harvey P. Dale, Nov 22 2014 *)
  • PARI
    a(n)=n*(n+1)/2-sigma(n) \\ Charles R Greathouse IV, Mar 19 2012
    
  • Python
    from sympy import divisor_sigma
    def A024816(n): return (n*(n+1)>>1)-divisor_sigma(n) # Chai Wah Wu, Apr 28 2023
    
  • SageMath
    def A024816(n): return sum(k for k in (0..n-1) if not k.divides(n))
    print([A024816(n) for n in srange(1, 55)])  # Peter Luschny, Nov 14 2023

Formula

a(n) = n*(n+1)/2 - sigma(n) = A000217(n) - A000203(n).
a(n) = A024916(n-1) - A153485(n), n > 1. - Omar E. Pol, Jun 24 2014
From Wesley Ivan Hurt, Jul 16 2014, Dec 28 2015: (Start)
a(n) = Sum_{i=1..n} i * ( ceiling(n/i) - floor(n/i) ).
a(n) = Sum_{k=1..n} (n mod k) + (-n mod k). (End)
G.f.: x/(1 - x)^3 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 18 2017
From Omar E. Pol, Mar 21 2021: (Start)
a(n) = A244048(n) + A004125(n).
a(n) = A153485(n-1) + A004125(n), n >= 2. (End)
a(p) = (p-2)*(p+1)/2 for p prime. - Bernard Schott, Apr 12 2022

A023896 Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention.

Original entry on oeis.org

1, 1, 3, 4, 10, 6, 21, 16, 27, 20, 55, 24, 78, 42, 60, 64, 136, 54, 171, 80, 126, 110, 253, 96, 250, 156, 243, 168, 406, 120, 465, 256, 330, 272, 420, 216, 666, 342, 468, 320, 820, 252, 903, 440, 540, 506, 1081, 384, 1029, 500, 816, 624, 1378, 486, 1100, 672
Offset: 1

Views

Author

Keywords

Comments

Sum of totatives of n, i.e., sum of integers up to n and coprime to n.
a(1) = 1, since 1 is coprime to any positive integer.
Row sums of A038566. - Wolfdieter Lang, May 03 2015
Islam & Manzoor prove that a(n) is an injection for n > 1, see links. In other words, if a(m) = a(n), and min(m, n) > 1, then m = n. - Muhammed Hedayet, May 19 2024

Examples

			G.f. = x + x^2 + 3*x^3 + 4*x^4 + 10*x^5 + 6*x^6 + 21*x^7 + 16*x^8 + 27*x^9 + ...
a(12) = 1 + 5 + 7 + 11 = 24.
n = 40: The smallest positive reduced residue system modulo 40 is {1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39}. The sum is a(40) = 320. Average is 20.
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 16, the function phi_1(n).
  • David M. Burton, Elementary Number Theory, p. 171.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2001, p. 163.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.

Crossrefs

Programs

  • Haskell
    a023896 = sum . a038566_row  -- Reinhard Zumkeller, Mar 04 2012
    
  • Magma
    [1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015
    
  • Maple
    A023896 := proc(n)
        if n = 1 then
            1;
        else
            n*numtheory[phi](n)/2 ;
        end if;
    end proc: # R. J. Mathar, Sep 26 2013
  • Mathematica
    a[ n_ ] = n/2*EulerPhi[ n ]; a[ 1 ] = 1; Table[a[n], {n, 56}]
    a[ n_] := If[ n < 2, Boole[n == 1], Sum[ k Boole[1 == GCD[n, k]], { k, n}]]; (* Michael Somos, Jul 08 2014 *)
  • PARI
    {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
    
  • PARI
    A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021
    
  • Python
    from sympy import totient
    def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022
    
  • SageMath
    def A023896(n): return 1 if n == 1 else n*euler_phi(n)//2
    print([A023896(n) for n in range(1, 57)])  # Peter Luschny, Dec 03 2023

Formula

a(n) = n*A023022(n) for n > 2.
a(n) = phi(n^2)/2 = n*phi(n)/2 = A002618(n)/2 if n > 1, a(1)=1. See the Apostol reference for this exercise.
a(n) = Sum_{1 <= k < n, gcd(k, n) = 1} k.
If n = p is a prime, a(p) = T(p-1) where T(k) is the k-th triangular number (A000217). - Robert G. Wilson v, Jul 31 2004
Equals A054521 * [1,2,3,...]. - Gary W. Adamson, May 20 2007
a(n) = A053818(n) * A175506(n) / A175505(n). - Jaroslav Krizek, Aug 01 2010
If m,n > 1 and gcd(m,n) = 1 then a(m*n) = 2*a(m)*a(n). - Thomas Ordowski, Nov 09 2014
G.f.: Sum_{n>=1} mu(n)*n*x^n/(1-x^n)^3, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 24 2015
G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019
For n > 1: a(n) = (n*A076512(n)/2)*A009195(n). - Jamie Morken, Dec 16 2019
Sum_{n>=1} 1/a(n) = 2 * A065484 - 1 = 3.407713... . - Amiram Eldar, Oct 09 2023

Extensions

Typos in programs corrected by Zak Seidov, Aug 03 2010
Name and example edited by Wolfdieter Lang, May 03 2015

A070251 Unrelated-factorial numbers: product of numbers unrelated to n (numbers which have a common divisor with n but do not divide n).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 6, 6, 192, 1, 720, 1, 23040, 6480, 10080, 1, 12902400, 1, 34836480, 2449440, 1857945600, 1, 50295168000, 3000, 980995276800, 9797760, 9564703948800, 1, 1518492398911488000, 1, 41845579776000, 1571364748800
Offset: 1

Views

Author

Amarnath Murthy, May 05 2002

Keywords

Comments

a(p) = 1 if p is a prime. 4 is the only composite number such that a(4) = 1.
From Michael De Vlieger, Jan 15 2025: (Start)
Conjecture: a(n) is in A055932, and also often in A025487.
Conjectures: a(6) = 4 is likely the only powerful term that exceeds 1. a(8) = a(9) = 6 is likely the only squarefree number exceeding 1 that appears in the sequence.
Conjecture: For n = 2*p, p > 3, gcd(n, a(n)) > 1, rad(n) does not divide a(n), and rad(a(n)) does not divide n, since gpf(n) does not divide a(n). For composite n > 9 not an even squarefree semiprime, n divides a(n). (End)

Examples

			Table of a(n) for composite n <= 30, showing prime power decomposition by listing exponents of primes shown in the column heads:
   n                   a(n)   2  3  5  7 11 13
  ---------------------------------------------
   6                     4    2
   8                     6    1, 1
   9                     6    1, 1
  10                   192    6, 1
  12                   720    4, 2, 1
  14                 23040    9, 2, 1
  15                  6480    4, 4, 1
  16                 10080    5, 2, 1, 1
  18              12902400   13, 2, 2, 1
  20              34836480   12, 5, 1, 1
  21               2449440    5, 7, 1, 1
  22            1857945600   17, 4, 2, 1
  24           50295168000   10, 6, 3, 2, 1
  25                  3000    3, 1, 3
  26          980995276800   21, 5, 2, 1, 1
  27               9797760    7, 7, 1, 1
  28         9564703948800   19, 6, 2, 1, 1, 1
  30   1518492398911488000   22,10, 3, 3, 1, 1
		

Crossrefs

Programs

  • Maple
    A070251 := proc(n) local i;
    remove(k->igcd(n,k)=1,{$1..n}); numtheory[divisors](n);
    mul(i, i = %% minus % ) end:   # Peter Luschny, Oct 11 2011
  • Mathematica
    a[n_] := Times @@ Complement[Range[n], Divisors[n]]/Times @@ Select[ Range[n], CoprimeQ[n, #]&];
    Array[a, 33] (* Jean-François Alcover, Jun 03 2019 *)

Formula

a(n) = A055067(n)/A001783(n). - Vladeta Jovovic, May 06 2002
From Michael De Vlieger, Jan 15 2025: (Start)
Let S(n) = { k < n : 1 < gcd(k,n) < k } = row n of A133995 for composite n > 4.
a(n) = product of S(n).
pi(gpf(a(n))) <= pi(n/lpf(n)), i.e., A000720(A006530(a(n))) <= A000720(n/A020639(n)). (End)

Extensions

More terms from Vladeta Jovovic, May 06 2002

A381497 a(n) = sum of numbers k < n such that 1 < gcd(k,n) and rad(k) != rad(n), where rad = A007947.

Original entry on oeis.org

0, 0, 0, 0, 0, 9, 0, 6, 6, 25, 0, 36, 0, 49, 45, 42, 0, 81, 0, 100, 84, 121, 0, 144, 45, 169, 96, 196, 0, 315, 0, 210, 198, 289, 175, 354, 0, 361, 273, 430, 0, 609, 0, 484, 435, 529, 0, 648, 140, 655, 459, 676, 0, 801, 385, 826, 570, 841, 0, 1260, 0, 961, 798
Offset: 1

Views

Author

Michael De Vlieger, Mar 02 2025

Keywords

Comments

Analogous to A066760(n), the sum of row n of A133995, and A381499(n), sum of row n of A272619.

Examples

			Table of n and a(n) for select n, showing prime power decomposition of both and row n of A381094:
   n   Factor(n) a(n)  Factor(a(n))  Row n of A381094
  -------------------------------------------------------------------
   6   2 * 3       9   3^2           {2,3,4}
   8   2^3         6   2 * 3         {6}
   9   3^2         6   2 * 3         {6}
  10   2 * 5      25   5^2           {2,4,5,6,8}
  12   2^2 * 3    36   2^2 * 3^2     {2,3,4,8,9,10}
  14   2 * 7      49   7^2           {2,4,6,7,8,10,12}
  15   3 * 5      45   3^2 * 5       {3,5,6,9,10,12}
  16   2^4        42   2 * 3 * 7     {6,10,12,14}
  18   2 * 3^2    81   3^4           {2,3,4,8,9,10,14,15,16}
  20   2^2 * 5   100   2^2 * 5^2     {2,4,5,6,8,12,14,15,16,18}
  21   3 * 7      84   2^2 * 3 * 7   {3,6,7,9,12,14,15,18}
  22   2 * 11    121   11^2          {2,4,6,8,10,11,12,14,16,18,20}
  24   2^3 * 3   144   2^4 * 3^2     {2,3,4,8,9,10,14,15,16,20,21,22}
a(6) = (2+4) + (3) = 9,
a(n) = 6 for n in {8, 9} since 6 is the only number less than n that shares a factor with n but does not have the same squarefree kernel as n.
a(10) = (2+4+6+8) + (5) = 25.
a(12) = (2+4+8+10) + (3+9) = 36.
a(14) = (2+4+6+8+10+12) + (7) = 49.
a(15) = (3+6+9+12) + (5+10) = 45.
a(16) = (6+10+12+14) = 42, etc.
		

Crossrefs

Programs

  • Mathematica
    rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; Table[r = rad[n]; Total@ Select[Range[n], Nor[CoprimeQ[#, n], rad[#] == r] &], {n, 120}]

Formula

a(n) is the sum of row n of A381094.
a(n) = 0 for prime n and n = 4.
a(n) = A067392(n) - A381498(n).

A250398 Composite numbers whose sum of divisors divides the sum of their unrelated numbers.

Original entry on oeis.org

4, 10, 22, 34, 46, 58, 82, 94, 106, 118, 142, 166, 178, 202, 214, 226, 262, 274, 298, 334, 346, 358, 382, 394, 454, 466, 478, 493, 502, 514, 526, 538, 562, 586, 622, 634, 694, 706, 718, 766, 778, 802, 838, 862, 886, 898, 922, 934, 958, 982, 1006, 1018, 1042, 1114
Offset: 1

Views

Author

Paolo P. Lava, Nov 21 2014

Keywords

Comments

For a definition of unrelated number see A045763.
Most of the terms belong to A112774. First difference is at a(28) = 493.

Examples

			There is no unrelated number to 4. Therefore 0 / sigma(4) = 0 / 7 = 0 is an integer.
Unrelated numbers to 10 are 4, 6, 8 and their sum is 18. Now, 18 / sigma(10) = 18 / 18 = 1, that is an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local n;
    for n from 1 to q do if not isprime(n) then
    if type((1+n*(n+1)/2-sigma(n)-n*phi(n)/2)/sigma(n),integer)
    then print(n); fi; fi; od; end: P(10^5);

A381499 a(n) = sum of numbers k < n such that 1 < gcd(k,n) < k and rad(k) does not divide n, where rad = A007947.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 0, 10, 0, 28, 28, 42, 0, 39, 0, 65, 65, 80, 0, 102, 45, 126, 96, 159, 0, 111, 0, 210, 148, 210, 138, 253, 0, 280, 221, 338, 0, 342, 0, 411, 366, 444, 0, 547, 140, 563, 403, 601, 0, 700, 344, 708, 512, 750, 0, 751, 0, 868, 703, 930
Offset: 1

Views

Author

Michael De Vlieger, Mar 02 2025

Keywords

Comments

Analogous to A066760(n), the sum of row n of A133995, and A381497(n), sum of row n of A381094.

Examples

			Table of n and a(n) for select n, showing prime power decomposition of the latter and row n of A272619:
 n   a(n)  Factor(a(n))  Row n of A272619
-----------------------------------------------------
 8     6   2 * 3         {6}
 9     6   2 * 3         {6}
10     6   2 * 3         {6}
12    10   2 * 5         {10}
14    28   2^2 * 7       {6,10,12}
15    28   2^2 * 7       {6,10,12}
16    42   2 * 3 * 7     {6,10,12,14}
18    39   3 * 13        {10,14,15}
20    65   5 * 13        {6,12,14,15,18}
21    65   5 * 13        {6,12,14,15,18}
22    80   2^4 * 5       {6,10,12,14,18,20}
24   102   2 * 3 * 17    {10,14,15,20,21,22}
25    45   3^2 * 5       {10,15,20}
26   126   2 * 3^2 * 7   {6,10,12,14,18,20,22,24}
27    96   2^5 * 3       {6,12,15,18,21,24}
28   159   3 * 53        {6,10,12,18,20,21,22,24,26}
		

Crossrefs

Programs

  • Mathematica
    rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; Table[r = rad[n]; If[PrimeQ[n], 0, Total@ Select[Range[n], And[1 < GCD[#, n] < #, ! Divisible[n, rad[#]]] &]], {n, 120}]

Formula

a(n) is the sum of row n of A272619.
a(n) = 0 for prime n, n = 4, and n = 6.

A250399 Composite numbers whose sum of aliquot parts divides the sum of their unrelated numbers.

Original entry on oeis.org

4, 14, 63, 85, 1649, 3127, 6401, 11521, 14121, 30005, 30629, 33101, 45671, 58829, 78227, 82947, 90581, 110975, 159877, 185399, 227341, 308179, 331918, 336299, 359413, 439619, 466759, 476677, 494321, 618701, 666409, 898967, 1044611, 1113641, 1228417, 1248707
Offset: 1

Views

Author

Paolo P. Lava, Nov 21 2014

Keywords

Comments

For a definition of unrelated number see A045763.

Examples

			There is no unrelated number to 4. Therefore 0 / (sigma(4)-4) = 0 / (7-4) = 0 is an integer.
Unrelated numbers to 14 are 4, 6, 8, 10, 12 and their sum is 40. Now, 40 / (sigma(14) - 14) = 40 / (24 - 14) = 40 / 10 = 4, that is an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local n;
    for n from 1 to q do if not isprime(n) then
    if type((1+n*(n+1)/2-sigma(n)-n*phi(n)/2)/(sigma(n)-n),integer)
    then print(n); fi; fi; od; end: P(10^5);
Showing 1-7 of 7 results.