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-10 of 16 results. Next

A325815 a(n) = A324213(n) - A034444(n).

Original entry on oeis.org

1, 2, 1, 6, 2, -2, 2, 14, 10, 5, 4, 10, 4, 8, 4, 30, 8, 22, 6, 17, 10, 14, 10, 16, 28, 12, 16, -2, 12, 16, 8, 62, 12, 20, 18, 84, 12, 26, 22, 32, 16, 24, 12, 38, 22, 24, 22, 50, 54, 76, 16, 28, 24, 36, 32, 56, 34, 38, 28, 48, 16, 38, 44, 126, 38, 40, 20, 46, 24, 64, 24, 118, 24, 50, 54, 42, 44, 48, 24, 82, 118, 56, 40, 88, 50, 48, 36, 86, 40
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A324213(n) - A034444(n).
a(A000396(n)) < 0 for all n.

A325819 a(n) = A324213(A228058(n)).

Original entry on oeis.org

26, 84, 78, 168, 118, 146, 242, 182, 208, 276, 200, 398, 396, 322, 438, 344, 390, 412, 536, 628, 432, 338, 582, 472, 558, 840, 512, 824, 640, 726, 1022, 852, 914, 628, 744, 616, 1178, 1018, 858, 1140, 856, 760, 990, 936, 1490, 1014, 1564, 1482, 1104, 1096, 1196, 1138, 1008, 1550, 1556, 1180, 1474, 1158, 1508, 858, 2020
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

If a(n) > 2 for all n, then there are no odd perfect numbers. See also the conjectures in A324213.

Crossrefs

Programs

  • PARI
    up_to = 25000;
    isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
    A228058list(up_to) = { my(v=vector(up_to), k=0, n=0); while(kA228058(n), k++; v[k] = n)); (v); };
    v228058 = A228058list(up_to);
    A228058(n) = v228058[n]; \\ Antti Karttunen, May 29 2019
    A324213(n) = { my(s=sigma(n)); sum(i=0, s, (1==gcd(n-i, n-(s-i)))); };
    A325819(n) = A324213(A228058(n));

Formula

a(n) = A324213(A228058(n)).

A325980 Lexicographically earliest sequence such that a(i) = a(j) => A046523(i) = A046523(j) and A324213(i) = A324213(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 30 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A046523(n), A324213(n)].
For all i, j: a(i) = a(j) => A325815(i) = A325815(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A324213(n) = { my(s=sigma(n)); sum(i=0, s, (1==gcd(n-i, n-(s-i)))); };
    v325980 = rgs_transform(vector(up_to,n,[A046523(n), A324213(n)]));
    A325980(n) = v325980[n];

A228058 Odd numbers of the form p^(1+4k) * r^2, where p is prime of the form 1+4m, r > 1, and gcd(p,r) = 1. (Euler's criteria for odd perfect numbers).

Original entry on oeis.org

45, 117, 153, 245, 261, 325, 333, 369, 405, 425, 477, 549, 605, 637, 657, 725, 801, 833, 845, 873, 909, 925, 981, 1017, 1025, 1053, 1233, 1325, 1341, 1377, 1413, 1421, 1445, 1525, 1557, 1573, 1629, 1737, 1773, 1805, 1813, 1825, 2009, 2057, 2061, 2097, 2169
Offset: 1

Views

Author

T. D. Noe, Aug 13 2013

Keywords

Comments

It has been proved that if an odd perfect number exists, it belongs to this sequence. The first term of the form p^5 * n^2 is 28125 = 5^5 * 3^2, occurring in position 520.
Sequence A228059 lists the subsequence of these numbers that are closer to being perfect than smaller numbers. - T. D. Noe, Aug 15 2013
Sequence A326137 lists terms with at least five distinct prime factors. See further comments there. - Antti Karttunen, Jun 13 2019

Crossrefs

Subsequence of A191218, and also of A228056 and A228057 (simpler versions of this sequence).
For various subsequences with additional conditions, see A228059, A325376, A325380, A325822, A326137 (with omega(n)>=5), A324898 (conjectured, subsequence if it does not contain any prime powers), A354362, A386425 (conjectured), A386427 (nondeficient terms), A386428 (powerful terms), A386429 U A351574.

Programs

  • Haskell
    import Data.List (partition)
    a228058 n = a228058_list !! (n-1)
    a228058_list = filter f [1, 3 ..] where
       f x = length us == 1 && not (null vs) &&
             fst (head us) `mod` 4 == 1 && snd (head us) `mod` 4 == 1
             where (us,vs) = partition (odd . snd) $
                             zip (a027748_row x) (a124010_row x)
    -- Reinhard Zumkeller, Aug 14 2013
    
  • Mathematica
    nn = 100; n = 1; t = {}; While[Length[t] < nn, n = n + 2; {p, e} = Transpose[FactorInteger[n]]; od = Select[e, OddQ]; If[Length[e] > 1 && Length[od] == 1 && Mod[od[[1]], 4] == 1 && Mod[p[[Position[e, od[[1]]][[1,1]]]], 4] == 1, AppendTo[t, n]]]; t (* T. D. Noe, Aug 15 2013 *)
  • PARI
    up_to = 1000;
    isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
    A228058list(up_to) = { my(v=vector(up_to), k=0, n=0); while(kA228058(n), k++; v[k] = n)); (v); };
    v228058 = A228058list(up_to);
    A228058(n) = v228058[n]; \\ Antti Karttunen, Apr 22 2019

Formula

From Antti Karttunen, Apr 22 2019 & Jun 03 2019: (Start)
A325313(a(n)) = -A325319(n).
A325314(a(n)) = -A325320(n).
A001065(a(n)) = A325377(n).
A033879(a(n)) = A325379(n).
A034460(a(n)) = A325823(n).
A325814(a(n)) = A325824(n).
A324213(a(n)) = A325819(n).
(End)

Extensions

Note in parentheses added to the definition by Antti Karttunen, Jun 03 2019

A325817 a(n) is the least k >= 0 such that n-k and n-(sigma(n)-k) are relatively prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 27, 0, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 0, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 5, 0, 0, 2, 0, 0, 1, 0, 1, 2
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

a(n) is the least k >= 0 such that -n + k and (n-sigma(n))+k are coprime.

Examples

			For n=15, gcd(15-0, 15-(24-0)) = 3, gcd(15-1, 15-(24-1)) = 2 and gcd(15-2, 15-(24-2)) = 1, thus a(15) = 2.
		

Crossrefs

Programs

  • Mathematica
    lk[n_]:=Module[{k=0},While[!CoprimeQ[n-k,n-(DivisorSigma[1,n]-k)],k++];k]; Array[lk,110] (* Harvey P. Dale, Nov 24 2024 *)
  • PARI
    A325817(n) = { my(s=sigma(n)); for(k=0, s, if(1==gcd(-n + k, (n-s)+k), return(k))); };
    
  • PARI
    A325817(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(i))); };

Formula

a(n) = A000203(n) - A325818(n) = A001065(n) - A325826(n) = n - A325976(n).
For all n:
a(A000396(n)) = A000396(n)-1.
a(n) <= n-1.
a(n) <= A325965(n).
a(n) <= A325967(n).

A325818 a(n) is the largest k <= sigma(n) such that n-k and n-(sigma(n)-k) are relatively prime.

Original entry on oeis.org

1, 3, 4, 7, 6, 7, 8, 15, 13, 17, 12, 27, 14, 23, 22, 31, 18, 38, 20, 41, 32, 35, 24, 59, 31, 39, 40, 29, 30, 71, 32, 63, 46, 53, 48, 91, 38, 59, 56, 89, 42, 95, 44, 83, 76, 69, 48, 123, 57, 93, 70, 95, 54, 119, 72, 119, 80, 89, 60, 167, 62, 95, 104, 127, 84, 143, 68, 125, 94, 143, 72, 194, 74, 113, 124, 137, 96
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

a(n) is the largest k <= sigma(n) such that (-n + k) and (n-sigma(n))+k are coprime.

Crossrefs

Programs

  • PARI
    A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };

Formula

a(n) = A000203(n) - A325817(n).
a(n) = n + A325826(n).
For all n:
a(A000396(n)) = A000396(n)+1.
a(n) >= A325961(n).
a(n) >= A325966(n).
a(n) >= A325968(n).

A325826 a(n) is the largest k <= sigma(n)-n such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 1, 7, 4, 7, 1, 15, 1, 9, 7, 15, 1, 20, 1, 21, 11, 13, 1, 35, 6, 13, 13, 1, 1, 41, 1, 31, 13, 19, 13, 55, 1, 21, 17, 49, 1, 53, 1, 39, 31, 23, 1, 75, 8, 43, 19, 43, 1, 65, 17, 63, 23, 31, 1, 107, 1, 33, 41, 63, 19, 77, 1, 57, 25, 73, 1, 122, 1, 39, 49, 61, 19, 89, 1, 105, 40, 43, 1, 139, 23, 43, 31, 91, 1, 143, 19, 75
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Crossrefs

Programs

  • PARI
    A325826(n) = { my(s=sigma(n)); forstep(k=s-n, 0, -1, if(1==gcd((n+n-sigma(n)), k), return(k))); };
    
  • PARI
    A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };
    A325826(n) = (A325818(n) - n);

Formula

a(n) = A325818(n) - n = A001065(n) - A325817(n) = A325976(n) - A033879(n).
a(A000040(n)) = a(A000396(n)) = 1.
a(n) >= A325969(n).
gcd(a(n), A325976(n)) = 1.

A325961 a(n) is the least k >= A061228(n)-1 such that n-k and n-(sigma(n)-k) are relatively prime, or 0 if no such k <= sigma(n) exists.

Original entry on oeis.org

1, 3, 0, 5, 0, 7, 0, 9, 11, 11, 0, 13, 0, 15, 20, 17, 0, 19, 0, 21, 24, 23, 0, 25, 29, 27, 30, 29, 0, 31, 0, 33, 38, 35, 40, 37, 0, 39, 42, 41, 0, 43, 0, 45, 50, 47, 0, 49, 55, 51, 58, 53, 0, 55, 60, 57, 60, 59, 0, 61, 0, 63, 66, 65, 70, 67, 0, 69, 74, 71, 0, 73, 0, 75, 78, 77, 84, 79, 0, 81, 83, 83, 0, 85, 90, 87, 92, 89, 0, 91, 100
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

a(n) attains the value of A325818(n) only with n = 1, 2 and the even terms of A000396. Note that A000203(n) > ((n+A020639(n))-1) with composite n.

Crossrefs

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A325961(n) = { my(s=sigma(n)); for(i=(-1)+n+A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); (0); };

Formula

a(n) = 0 if and only if n is either an odd prime or an odd perfect number, but if n is neither, then a(n) = 2n - A325962(n).

A325966 a(n) is the largest i <= sigma(n)-A020639(n) such that n-i and n-(sigma(n)-i) are relatively prime.

Original entry on oeis.org

0, 1, 0, 5, 0, 7, 0, 13, 10, 15, 0, 25, 0, 21, 20, 29, 0, 37, 0, 39, 28, 33, 0, 55, 26, 39, 36, 29, 0, 67, 0, 61, 44, 51, 42, 89, 0, 57, 52, 87, 0, 91, 0, 81, 74, 69, 0, 121, 50, 91, 68, 95, 0, 115, 66, 117, 76, 87, 0, 163, 0, 93, 100, 125, 78, 139, 0, 121, 92, 141, 0, 193, 0, 111, 120, 137, 88, 163, 0, 183, 118, 123, 0
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Crossrefs

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A325966(n) = { my(s=sigma(n)); forstep(i=s-A020639(n), 0, -1, if(1==gcd(n-i, n-(s-i)), return(i))); };

Formula

a(n) = A000203(n) - A325965(n).
For all n:
a(A000396(n)) = A000396(n)+1.
a(n) <= A325818(n).

A325807 Number of ways to partition the divisors of n into complementary subsets x and y for which gcd(n-Sum(x), n-Sum(y)) = 1. (Here only distinct unordered pairs of such subsets are counted.)

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 1, 8, 3, 4, 1, 16, 1, 4, 2, 16, 1, 16, 1, 16, 4, 4, 1, 40, 3, 3, 4, 1, 1, 40, 1, 32, 2, 4, 4, 244, 1, 4, 4, 48, 1, 40, 1, 16, 8, 3, 1, 220, 3, 27, 2, 10, 1, 32, 4, 64, 4, 4, 1, 672, 1, 4, 14, 64, 4, 40, 1, 13, 2, 64, 1, 1205, 1, 4, 16, 10, 4, 40, 1, 236, 15, 4, 1, 864, 4, 3, 2, 64, 1, 640, 2, 16, 4, 4, 2, 537, 1, 26, 8, 241, 1, 40, 1, 64, 40
Offset: 1

Views

Author

Antti Karttunen, May 24 2019

Keywords

Examples

			For n = 1, its divisor set [1] can be partitioned only to an empty set [] and set [1], with sums 0 and 1 respectively, and gcd(1-0,1-1) = gcd(1,0) = 1, thus this partitioning is included, and a(1) = 1.
For n = 3, its divisor set [1, 3] can be partitioned as [] and [1,3] (sums 0 and 4, thus gcd(3-0,3-4) = 1), [1] and [3] (sums 1 and 3, thus gcd(3-1,3-3) = 2), thus a(3) = 1, and similarly a(p) = 1 for any other odd prime p as well.
For n = 6, its divisor set [1, 2, 3, 6] can be partitioned in eight ways as:
  [] and [1, 2, 3, 6] (sums 0 and 12, gcd(6-0, 6-12) = 6),
  [1, 2] and [3, 6]   (sums 3 and 9,  gcd(6-3, 6-9) = 3),
  [1, 3] and [2, 6]   (sums 4 and 8,  gcd(6-4, 6-8) = 2),
  [2] and [1, 3, 6]   (sums 2 and 10, gcd(6-2, 6-10) = 4),
  [3] and [1, 2, 6]   (sums 3 and 9,  gcd(6-3, 6-9) = 3),
  [6] and [1, 2, 3]   (sums 6 and 6,  gcd(6-6, 6-6) = 0),
  [1] and [2, 3, 6]   (sums 1 and 11, gcd(6-1, 6-11) = 5),
  [1, 6] and [2, 3]   (sums 7 and 5,  gcd(6-7, 6-5) = 1),
with only the last partitioning satisfying the required condition, thus a(6) = 1.
For n = 10, its divisor set [1, 2, 5, 10] can be partitioned in eight ways as:
  [] and [1, 2, 5, 10] (sums 0 and 18, gcd(10-0, 10-18) = 2),
  [1, 2] and [5, 10]   (sums 3 and 15, gcd(10-3, 10-15) = 1),
  [1, 5] and [2, 10]   (sums 6 and 12, gcd(10-6, 10-12) = 2),
  [2] and [1, 5, 10]   (sums 2 and 16, gcd(10-2, 10-16) = 2),
  [5] and [1, 2, 10]   (sums 5 and 13, gcd(10-5, 10-13) = 1),
  [10] and [1, 2, 5]   (sums 10 and 8, gcd(10-10, 10-8) = 2),
  [1] and [2, 5, 10]   (sums 1 and 17, gcd(10-1, 10-17) = 1),
  [1, 10] and [2, 5]   (sums 11 and 7, gcd(10-11, 10-7) = 1),
of which four satisfy the required condition, thus a(10) = 4.
		

Crossrefs

Programs

Formula

For all n >= 1:
a(n) <= A100577(n).
a(A065091(n)) = 1, a(A000396(n)) = 1.
a(A228058(n)) = A325809(n).
Showing 1-10 of 16 results. Next