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

A188775 Numbers k such that Sum_{j=1..k} j^j == -1 (mod k).

Original entry on oeis.org

1, 2, 3, 6, 14, 42, 46, 1806, 2185, 4758, 5266, 10895, 24342, 26495, 44063, 52793, 381826, 543026, 547311, 805002
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that A001923(k) == -1 (mod k).
a(21) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015
Numbers k such that k divides A062970(k). - Jianing Song, Feb 03 2019

Examples

			6 is a term because 1^1 + 2^2 + 3^3 + 4^4 + 5^5 + 6^6 = 50069 and 50069 + 1 = 6 * 8345. - _Bernard Schott_, Feb 03 2019
		

Crossrefs

Cf. A128981 (sum == 0 (mod n)), A188776 (sum == 1 (mod n)).
Cf. A057245.

Programs

  • Maple
    isA188775 := proc(n) add( modp(k &^ k,n),k=1..n) ; if modp(%,n) = n-1 then true; else false; end if; end proc:
    for n from 1 do if isA188775(n) then printf("%d\n",n) ; end if; end do: # R. J. Mathar, Apr 10 2011
  • Mathematica
    Union@Table[If[Mod[Sum[PowerMod[i,i,n],{i,1,n}],n]==n-1,Print[n];n],{n,1,10000}]
  • PARI
    f(n)=lift(sum(k=1,n,Mod(k,n)^k));
    for(n=1,10^6,if(f(n)==n-1,print1(n,", "))) \\ Joerg Arndt, Apr 10 2011
    
  • PARI
    m=0;for(n=1,1000,m=m+n^n;if((m+1)%n==0,print1(n,", "))) \\ Jinyuan Wang, Feb 04 2019
    
  • Python
    sum = 0
    for n in range(10000):
        sum += n**n
        if sum % (n+1) == 0:
            print(n+1, end=',')
    # Alex Ratushnyak, May 13 2013

Extensions

a(12)-a(16) from Joerg Arndt, Apr 10 2011
a(17)-a(20) from Lars Blomberg, May 10 2011

A188776 Numbers n such that Sum_{k=1..n} k^k == 1 (mod n).

Original entry on oeis.org

1, 2, 9, 30, 6871, 185779, 208541, 813162, 864355, 2573155
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that A001923(n) == 1 (mod n).
a(11) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015

Crossrefs

Cf. A001923, A128981 (sum == 0 mod n), A188775 (sum == -1 mod n).

Programs

  • Mathematica
    Union@Table[If[Mod[Sum[PowerMod[i,i,n],{i,1,n}],n]==1,Print[n];n],{n,1,20000}]
  • PARI
    f(n)=lift(sum(k=1, n, Mod(k, n)^k));
    for(n=1, 10^6, if(f(n)==1, print1(n, ", "))) /* Joerg Arndt, Apr 10 2011 */
    
  • Python
    from itertools import accumulate, count, islice
    def A188776_gen(): # generator of terms
        yield 1
        for i, j in enumerate(accumulate(k**k for k in count(2)),start=2):
            if not j % i:
                yield i
    A188776_list = list(islice(A188776_gen(),5)) # Chai Wah Wu, Jun 18 2022

Extensions

a(6)-a(9) from Lars Blomberg, May 10 2011
a(1) inserted and a(10) added by Hiroaki Yamanouchi, Aug 25 2015

A341437 Numbers k such that k divides Sum_{j=0..k} j^(k-j).

Original entry on oeis.org

1, 2, 6, 7, 9, 42, 46, 431, 1806, 2506, 11318, 16965, 25426, 33146, 33361, 37053, 49365, 99221, 224506, 359703, 436994
Offset: 1

Views

Author

Seiichi Manyama, Feb 11 2021

Keywords

Comments

Numbers k such that k divides A026898(k-1).
a(19) > 10^5.

Crossrefs

Programs

  • Mathematica
    Do[If[Mod[Sum[PowerMod[k, n - k, n], {k, 0, n}], n] == 0, Print[n]], {n, 1, 3000}] (* Vaclav Kotesovec, Feb 12 2021 *)
  • PARI
    isok(n) = sum(k=0, n, Mod(k, n)^(n-k))==0;

Formula

0^6 + 1^5 + 2^4 + 3^3 + 4^2 + 5^1 + 6^0 = 66 = 6 * 11. So 6 is a term.

Extensions

a(19) from Vaclav Kotesovec, Feb 14 2021
a(20)-a(21) from Chai Wah Wu, Feb 15 2021

A225727 Numbers k such that sum of first k primorials (A143293) is divisible by k.

Original entry on oeis.org

1, 3, 17, 51, 967, 2901, 16439, 49317, 147951, 1331559
Offset: 1

Views

Author

Alex Ratushnyak, May 13 2013

Keywords

Comments

a(5) = 967 is a prime,
a(6) = a(5) * 3,
a(7) = a(5) * 17,
a(8) = a(5) * 51,
a(9) = a(5) * 51 * 3,
a(10) = a(5) * 51 * 27.
The next term, if it exists, is greater than 15600000. - Alex Ratushnyak, Jun 16 2013

Examples

			Sum of first 3 primorials is 1+2+6=9, because 9 is divisible by 3, the latter is in the sequence.
Sum of first 17 primorials is A143293(17) = 1955977793053588026279. Because A143293(17) is divisible by 17, the latter is in the sequence.
		

Crossrefs

Programs

  • Python
    primes = [2,3]
    def addPrime(k):
      for p in primes:
        if k%p==0:  return
        if p*p > k:  break
      primes.append(k)
    for n in range(5,1000000,6):
      addPrime(n)
      addPrime(n+2)
    sum_ = 0
    primorial = n = 1
    for p in primes:
      sum_ += primorial
      primorial *= p
      if sum_ % n == 0:  print(n, end=', ')
      n += 1
    
  • Python
    from itertools import chain, accumulate, count, islice
    from operator import mul
    from sympy import prime
    def A225727_gen(): return (i+1 for i, m in enumerate(accumulate(accumulate(chain((1,),(prime(n) for n in count(1))), mul))) if m % (i+1) == 0)
    A225727_list = list(islice(A225727_gen(),6)) # Chai Wah Wu, Feb 23 2022

A343931 Numbers k such that Sum_{j=1..k} (-j)^j == 0 (mod k).

Original entry on oeis.org

1, 3, 4, 11, 131, 188, 324, 445, 3548, 8284, 201403, 253731, 564084, 1812500, 4599115
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Comments

Also numbers k such that k divides A001099(k).

Crossrefs

Programs

  • Mathematica
    q[n_] := Divisible[Sum[PowerMod[-k, k, n], {k, 1, n}], n]; Select[Range[8500], q] (* Amiram Eldar, May 04 2021 *)
  • PARI
    isok(n) = sum(k=1, n, Mod(-k, n)^k)==0;
    
  • Python
    from itertools import accumulate, count, islice
    def A343931_gen(): # generator of terms
        yield 1
        for i, j in enumerate(accumulate((-k)**k for k in count(1)),start=2):
            if j % i == 0:
                yield i
    A343931_list = list(islice(A343931_gen(),10)) # Chai Wah Wu, Jun 18 2022

Extensions

a(11)-a(13) from Chai Wah Wu, May 04 2021
a(14) from Martin Ehrenstein, May 05 2021
a(15) from Martin Ehrenstein, May 08 2021

A341436 Numbers k such that k divides Sum_{j=1..k} j^(k+1-j).

Original entry on oeis.org

1, 5, 16, 208, 688, 784, 2864, 9555, 17776, 81239
Offset: 1

Views

Author

Seiichi Manyama, Feb 11 2021

Keywords

Comments

Numbers k such that k divides A003101(k).
a(11) > 10^5.

Examples

			1^5 + 2^4 + 3^3 + 4^2 + 5^1 = 65 = 5 * 13. So 5 is a term.
		

Crossrefs

Programs

  • Mathematica
    Do[If[Mod[Sum[PowerMod[k, n + 1 - k, n], {k, 1, n}], n] == 0, Print[n]], {n, 1, 3000}] (* Vaclav Kotesovec, Feb 12 2021 *)
  • PARI
    isok(n) = sum(k=1, n, Mod(k, n)^(n+1-k))==0;

A343932 a(n) = (Sum_{k=1..n} k^k) mod n.

Original entry on oeis.org

0, 1, 2, 0, 3, 5, 5, 4, 1, 7, 3, 4, 11, 13, 3, 4, 0, 15, 0, 4, 14, 13, 10, 20, 22, 11, 25, 20, 21, 1, 18, 4, 6, 17, 27, 12, 31, 27, 20, 28, 6, 41, 34, 32, 31, 45, 45, 4, 11, 25, 39, 48, 21, 45, 46, 12, 53, 47, 41, 32, 9, 5, 55, 4, 25, 7, 47, 8, 45, 19, 12, 60, 50, 43, 20, 60, 54, 29, 72, 36, 70, 31, 74, 40, 69, 7, 18, 20, 63, 3, 24, 32
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Sum[PowerMod[k, k, n], {k, 1, n}], n]; Array[a, 100] (* Amiram Eldar, May 04 2021 *)
  • PARI
    a(n) = sum(k=1, n, k^k)%n;
    
  • Python
    def A343932(n): return sum(pow(k,k,n) for k in range(1,n+1)) % n # Chai Wah Wu, Jun 18 2022

Formula

a(n) = A001923(n) mod n.

A383228 a(n) is the number of cases where both j and k (1 <= j < k <= n), are divisors of Sum_{i=j..k} i^i.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17
Offset: 1

Views

Author

Jean-Marc Rebert, Apr 20 2025

Keywords

Examples

			1 and 4 divide Sum_{i = 1..4} i^i = 288, and
1 and 17 divide Sum_{i = 1..17} i^i = 846136323944176515621, and
1 and 19 divide Sum_{i = 1..19} i^i = 2018612200059554303215024, and
2 and 9 divide Sum_{i = 2..9} i^i = 405071316, and
2 and 30 divide Sum_{i = 2..30} i^i = 208492413443704093346554910065262730566475780, and
3 and 6 divide Sum_{i = 3..6} i^i = 50064, and
5 and 15 divide Sum_{i = 5..15} i^i = 449317984130199540, and
14 and 42 divide Sum_{i = 14..42} i^i = 151474018115847331407847533862930150275321445330384244581082952733296, and
22 and 26 divide Sum_{i = 22..26} i^i = 6246292379849897330286605654999947328, so a(42) = 9.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(j=1, n, sum(k=j+1, n, my(s=sum(i=j, k, i^i)); !(s % j) && !(s % k))); \\ Michel Marcus, Apr 20 2025

Extensions

More terms from Michel Marcus, Apr 20 2025
Showing 1-8 of 8 results.