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

A342630 Numbers k such that A340180(k) is prime.

Original entry on oeis.org

5, 6, 7, 14, 18, 24, 29, 34, 39, 41, 47, 53, 77, 114, 119, 148, 150, 159, 176, 188, 189, 190, 191, 205, 215, 217, 218, 241, 268, 288, 312, 314, 331, 334, 339, 342, 346, 352, 364, 367, 387, 390, 402, 418, 429, 438, 439, 440, 446, 449, 480, 493, 494, 500, 504, 510, 521, 523, 546, 549, 553, 561, 580
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 17 2021

Keywords

Examples

			a(4) = 14 is a term because A340180(14) = 23 is prime.
		

Crossrefs

Cf. A340180.

Programs

  • Maple
    f:= proc(n) local s,k;
      s:= numtheory:-sigma(n);
      add(`if`(igcd(n,k)=1, s mod k, 0),k=1..n-1);
    end proc:
    select(t -> isprime(f(t)), [$1..1000]);

A337189 Numbers k such that k divides A340180(k).

Original entry on oeis.org

1, 2, 3, 7, 61, 75, 104, 2097, 3304, 7320, 42104, 280586
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 29 2021

Keywords

Examples

			a(4) = 61 is a term because A340180(61) = 671 = 11*61.
		

Crossrefs

Cf. A340180.

Programs

  • Maple
    f := proc(n)
    local t, s, k;
        s := numtheory:-sigma(n);
        t := 0;
        for k to n - 1 do if igcd(n, k) = 1 then t := t + (s mod k) end if
        end do;
        t
    end proc:
    select(t -> f(t) mod t = 0, [$1..10000]);
  • Mathematica
    f[n_] := Mod[DivisorSigma[1, n], Select[Range[n-1], CoprimeQ[#, n]&]] // Total;
    Select[Range[300000], If[Divisible[f[#], #], Print[#]; True, False]&] (* Jean-François Alcover, Jan 31 2021 *)

Extensions

a(12) from Jean-François Alcover, Feb 01 2021

A342644 Primes in A340180.

Original entry on oeis.org

2, 2, 7, 23, 19, 43, 137, 139, 239, 283, 373, 491, 1019, 929, 2609, 2699, 1499, 4451, 3191, 4441, 5261, 3251, 6373, 7853, 8623, 9013, 6359, 10289, 9109, 6833, 7703, 13417, 19441, 15329, 19793, 9311, 16319, 13109, 12539, 23899, 26347, 10111, 11351, 19687, 27851, 13627, 34129, 18521, 27277, 35537
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 17 2021

Keywords

Comments

Terms are listed in the order in which they appear in A340180, including repetitions.
Repeated terms include a(1) = a(2) = 2, a(55) = a(56) = 17333, and a(233) = a(319) = 1253761. Are there any others?

Examples

			a(4) = A340180(A342630(4)) = A340180(14) = 23.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local s,k;
      s:= numtheory:-sigma(n);
      add(`if`(igcd(n,k)=1, s mod k, 0),k=1..n-1);
    end proc:
    select(isprime,map(f, [$1..1000]));
  • Mathematica
    Select[Array[Sum[Mod[DivisorSigma[1, #], k] Floor[1/GCD[k, #]], {k, # - 1}] &, 500], PrimeQ] (* Michael De Vlieger, Mar 17 2021 *)

Formula

a(n) = A340180(A342630(n)).

A340179 a(n) = Sum_{x in C(n)} (A023896(n) mod x), where C(n) is the set of numbers < n coprime to n, and A023896(n) is the sum of C(n).

Original entry on oeis.org

0, 0, 1, 1, 3, 1, 6, 4, 15, 10, 25, 9, 33, 20, 25, 32, 49, 24, 56, 34, 68, 48, 98, 35, 152, 54, 100, 89, 180, 30, 178, 91, 146, 146, 150, 115, 314, 160, 220, 166, 315, 120, 306, 211, 267, 254, 412, 196, 485, 224, 383, 339, 600, 243, 609, 306, 481, 419, 801, 215, 859, 490, 577, 567, 782, 297, 865
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 30 2020

Keywords

Examples

			For n=8, C = {1,3,5,7}, c = 1+3+5+7 = 16, and a(n) = (16 mod 1) + (16 mod 3) + (16 mod 5) + (16 mod 7) = 0+1+1+2 = 4.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local C,s,c;
      C:=select(t -> igcd(t,n) = 1, [$1..n-1]);
      s:= convert(C,`+`);
      add(s mod c, c = C)
    end proc:
    map(f, [$1..100]);
  • Mathematica
    Table[Total@ Mod[#2, #1] & @@ {#, Total@ #} &@ Select[Range[n], GCD[#, n] == 1 &], {n, 67}] (* Michael De Vlieger, Dec 31 2020 *)
  • PARI
    apply( {A340179(n,s=n*eulerphi(n)\/2)=sum(k=2,n-1,if(gcd(n,k)<2,s%k))}, [1..66]) \\ M. F. Hasler, Feb 01 2021

A340976 Sum_{1 < k < n} sigma(n) mod k, where sigma = A000203.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 7, 8, 18, 11, 16, 27, 30, 30, 40, 47, 46, 75, 60, 72, 101, 93, 84, 109, 146, 148, 167, 142, 137, 180, 166, 197, 254, 282, 283, 301, 247, 333, 367, 347, 283, 389, 327, 367, 475, 501, 373, 591, 517, 562, 621, 597, 491, 615, 699, 637, 810, 839, 585, 783, 671, 964, 1024
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2021

Keywords

Comments

Motivated by A340180 and several other sequences that use the sum over a subset of the indices.
Is there an efficient formula for a(n)? That might answer the following questions:
1) Is a(63) = a(2^6-1) = 1024 = 2^10 just a coincidence?
2) Are there are further terms of the form 2^k, i.e., a(n) in A000079? What can be said about these n?
3) Are there other fixed points a(n) = n as for n = 7, 8?
4) What is the frequency of odd vs. even terms? a(n) is odd for consecutive indices 21..22, 35..49, 51..56, 58..61, 64..65, 68..69, 73..79, ...: Are there patterns or simple subsequence(s) of such runs of length 2 or larger?

Crossrefs

Programs

  • Mathematica
    Table[Sum[Mod[DivisorSigma[1,n],k],{k,2,n-1}],{n,1,138}] (* Metin Sariyar, Feb 02 2021 *)
  • PARI
    apply( {A340976(n,s=sigma(n))=sum(k=1,n-1,s%k)}, [1..66]) \\ M. F. Hasler, Feb 01 2021
    
  • PARI
    T(n) = n*(n+1)/2;
    S(n) = my(s=sqrtint(n)); sum(k=1, s, T(n\k) + k*(n\k)) - s*T(s); \\ A024916
    g(a,b) = my(s=0); while(a <= b, my(t=b\a); my(u=b\t); s += t*(T(u) - T(a-1)); a = u+1); s;
    a(n) = (n-1)*sigma(n) - S(sigma(n)) + g(n, sigma(n)); \\ Daniel Suteu, Feb 02 2021

Formula

a(n) = (n-1)*sigma(n) - A024916(sigma(n)) + Sum_{k=n..sigma(n)} k*floor(sigma(n)/k). - Daniel Suteu, Feb 02 2021
Showing 1-5 of 5 results.