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 31-40 of 43 results. Next

A342490 a(n) = Sum_{d|n} phi(d)^(n-1).

Original entry on oeis.org

1, 2, 5, 10, 257, 66, 46657, 16514, 1679873, 524290, 10000000001, 4200450, 8916100448257, 26121388034, 4398314962945, 35185445863426, 18446744073709551617, 33853319151618, 39346408075296537575425, 144115737832194050, 3833763648605916233729, 2000000000000000000002
Offset: 1

Views

Author

Seiichi Manyama, Mar 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[#]^(n-1) &]; Array[a, 20] (* Amiram Eldar, Mar 14 2021 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)^(n-1));
    
  • PARI
    a(n) = sum(k=1, n, eulerphi(n/gcd(k, n))^(n-2));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)^(k-1)*x^k/(1-(eulerphi(k)*x)^k)))

Formula

a(n) = Sum_{k=1..n} phi(n/gcd(k, n))^(n-2).
G.f.: Sum_{k>=1} phi(k)^(k-1) * x^k/(1 - (phi(k) * x)^k).
If p is prime, a(p) = 1 + (p-1)^(p-1) = A014566(p-1).

A366820 a(n) is the sum of the divisors of n^n + 1.

Original entry on oeis.org

3, 3, 6, 56, 258, 6264, 52136, 1559520, 17041416, 706911048, 10102223208, 706019328000, 9101898907920, 519285252355776, 11672709747324912, 880565163670372352, 18446811354131136516, 1792353900753729655758, 54357680125881245248800, 4154723599066412190910560
Offset: 0

Views

Author

Sean A. Irvine, Oct 24 2023

Keywords

Crossrefs

Programs

  • Mathematica
    {3}~Join~Array[DivisorSigma[1, #^# + 1] &, 19] (* Michael De Vlieger, Oct 24 2023 *)
  • PARI
    a(n) = sigma(n^n+1);

Formula

a(n) = A000203(A014566(n)).

A064772 Sum of primes dividing n^n+1 (with repetition).

Original entry on oeis.org

2, 5, 11, 257, 526, 147, 1030, 1027, 530793, 31603, 58685, 2228292, 113060, 180326, 163123, 67280421584898, 45957792327018709129, 33414185, 870543318650, 4406613081350403, 22864393425065, 82812579069940, 1576297793, 27266016518
Offset: 1

Views

Author

Jason Earls, Oct 19 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Total[Times@@@FactorInteger[n^n+1]],{n,25}] (* Harvey P. Dale, Sep 17 2011 *)
  • PARI
    sopfr(n)= { local(f,s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]*f[i, 2]); return(s) } { for (n=1, 61, write("b064772.txt", n, " ", sopfr(n^n + 1)) ) } \\ Harry J. Smith, Sep 24 2009

A073943 a(n) = smallest m such that n-th prime divides m^m + 1.

Original entry on oeis.org

1, 5, 2, 3, 21, 6, 24, 27, 11, 14, 15, 6, 25, 63, 23, 26, 117, 30, 99, 35, 9, 39, 165, 11, 6, 10, 51, 213, 54, 7, 63, 261, 174, 23, 74, 33, 78, 27, 83, 86, 357, 30, 95, 12, 14, 11, 15, 111, 453, 18, 12, 119, 90, 501, 4, 131, 82, 135, 117, 60, 45, 138, 51, 95, 54, 114, 75
Offset: 1

Views

Author

Jason Earls, Nov 13 2002

Keywords

Examples

			6th prime is 13 and 13 first divides 6^6 + 1 = 46657, so a(6) = 6.
		

Crossrefs

Cf. A014566.

Programs

  • Mathematica
    smp[n_]:=Module[{m=1},While[PowerMod[m,m,n]!=n-1,m++];m]; smp/@Prime[ Range[ 70]] (* Harvey P. Dale, Jul 21 2018 *)

A085602 Numbers of the form (2n+1)^(2n+1) + 1.

Original entry on oeis.org

2, 28, 3126, 823544, 387420490, 285311670612, 302875106592254, 437893890380859376, 827240261886336764178, 1978419655660313589123980, 5842587018385982521381124422, 20880467999847912034355032910568, 88817841970012523233890533447265626
Offset: 1

Views

Author

Cino Hilliard, Jul 07 2003

Keywords

Comments

Also even Sierpinski numbers of the first kind.
No term is a square. Moreover, x^x + 1 != k^x, for if it were, we would have a counterexample to Fermat's Last Theorem.

Crossrefs

Bisection of A014566 (odd part).

Programs

  • Mathematica
    #^#+1&/@Range[1,21,2] (* Harvey P. Dale, Dec 08 2012 *)
  • PARI
    forstep(x=1,20,2,print1(x^x+1" "))

Formula

a(n) = (2*n-1)^(2*n-1)+1. - Alois P. Heinz, Feb 27 2020

A131839 Additive persistence of Sierpinski numbers of first kind.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Sierpinski number 257 --> 2+5+7 = 14 --> 1+4 = 5 thus persistence is 2.
The sixteenth Sierpinski number is 16^16 + 1 = 18446744073709551617 --> 1+8+4+4+6+7+4+4+0+7+3+7+0+9+5+5+1+6+1+7 = 89 --> 8+9 = 17 --> 1+7 = 8, thus a(16) = 3 because in three steps we obtain a number < 10. - _Antti Karttunen_, Dec 15 2017
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, count;
      t:= n^n+1;
      count:= 0;
      while t > 9 do
        count:= count+1;
        t:= convert(convert(t,base,10),`+`);
      od;
      count
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 18 2017
  • Mathematica
    f[n_] := Length@ NestWhileList[Plus @@ IntegerDigits@# &, n^n + 1, UnsameQ@## &,     All] - 2; Array[f, 105] (* Robert G. Wilson v, Dec 18 2017 *)
  • PARI
    allocatemem(2^30);
    A007953(n) = { my(s); while(n, s+=n%10; n\=10); s; };
    A031286(n) = { my(s); while(n>9, s++; n=A007953(n)); s; }; \\ This function after Charles R Greathouse IV, Sep 13 2012
    A014566(n) = (1+(n^n));
    A131839(n) = A031286(A014566(n)); \\ Antti Karttunen, Dec 15 2017

Formula

a(n) = A031286(A014566(n)). - Antti Karttunen, Dec 15 2017

Extensions

Erroneous terms (first at n=16) corrected by Antti Karttunen, Dec 15 2017

A225945 Numbers k such that prime(k) divides k^k + 1.

Original entry on oeis.org

1, 6, 60, 136, 124796, 3919272, 18363918, 153037808, 965108649, 3140421892, 5961162423, 20437804784
Offset: 1

Views

Author

Alex Ratushnyak, May 21 2013

Keywords

Comments

a(12) > 2*10^10. - Giovanni Resta, May 23 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], (p = Prime[#]; PowerMod[#, #, p] == p - 1) &] (* Giovanni Resta, May 23 2013 *)
  • Python
    from sympy import nextprime, prime
    from itertools import count, islice
    def agen(startn=1): # generator of terms
        pn = prime(startn)
        for n in count(startn):
            if pow(n, n, pn) == pn - 1:
                yield n
            pn = nextprime(pn)
    print(list(islice(agen(), 5))) # Michael S. Branicky, May 25 2023

Extensions

a(6)-a(11) from Giovanni Resta, May 23 2013
a(12) from Michael S. Branicky, May 25 2023

A271186 Odd integers k such that k^k + 1 is the sum of 2 nonzero squares.

Original entry on oeis.org

1, 9, 17, 25, 49, 73, 81, 89, 97, 121
Offset: 1

Views

Author

Altug Alkan, Apr 01 2016

Keywords

Examples

			9 is a term because 9^9 + 1 = 1457^2 + 19629^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 25, 2], Length[PowersRepresentations[#^# + 1, 2, 2] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Apr 01 2016 *)
  • PARI
    a014566(n) = n^n+1;
    isA000404(n) = { for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
    for(n=1, 1e2, if(isA000404(a014566(n)) && n%2 == 1, print1(n, ", ")));

Extensions

a(6)-a(10) from Jinyuan Wang, Aug 14 2022

A271267 Even numbers k such that k + 2 divides k^k + 2.

Original entry on oeis.org

4, 16, 196, 2836, 5956, 25936, 65536, 540736, 598816, 797476, 1151536, 3704416, 8095984, 11272276, 13362420, 21235696, 29640832, 31084096, 42913396, 49960912, 55137316, 70254724, 70836676, 81158416, 94618996, 111849956, 129275056, 150026176, 168267856, 169242676, 189796420, 192226516, 198464176, 208232116, 244553296, 246605776, 300018016, 318143296
Offset: 1

Views

Author

Altug Alkan, Apr 03 2016

Keywords

Comments

In other words, even numbers k such that k + 2 divides A014566(k) + 1.
Even terms of A213382.
4, 16, 65536 are the numbers of the form 2^(2^(2^k)), for k >= 0. Are there other members of this sequence with the form of 2^(2^(2^k))?
2^(2^(2^3)) and 2^(2^(2^4)) are terms. - Michael S. Branicky, Apr 16 2021

Examples

			4 is a term because 4 + 2 = 6 divides 4^4 + 2 = 258.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 10^4, 2], Divisible[#^# + 2, # + 2] &] (* Michael De Vlieger, Apr 03 2016 *)
  • PARI
    lista(nn) = forstep(n=2, nn, 2, if( Mod(n, n+2)^n == -2 , print1(n, ", "))); \\ Joerg Arndt, Apr 03 2016
    
  • Python
    def afind(limit):
      k = 2
      while k < limit:
        if (pow(k, k, k+2) + 2)%(k+2) == 0: print(k, end=", ")
        k += 2
    afind(10**7) # Michael S. Branicky, Apr 16 2021

A009661 Smallest number m such that m^m+1 is divisible by n.

Original entry on oeis.org

0, 0, 5, 3, 2, 5, 3, 7, 17, 9, 21, 11, 6, 3, 29, 15, 24, 17, 27, 19, 41, 21, 11, 23, 18, 25, 53, 3, 14, 29, 15, 31, 35, 33, 69, 35, 6, 27, 77, 39, 25, 41, 63, 35, 89, 11, 23, 47, 97, 49, 101, 51, 26, 53, 109, 55, 113, 35, 117, 59, 30, 15, 125, 63, 18, 35, 99, 67, 11, 69, 35, 71, 9, 27
Offset: 1

Views

Author

Keywords

Comments

If n is odd, then a(n) <= 2*n - 1. If n is even, then a(n) <= n - 1. - Thomas Ordowski, Dec 03 2023

Crossrefs

Programs

  • PARI
    a(n) = my(m=0); while ((1+Mod(m, n)^m) != 0, m++); m; \\ Michel Marcus, Dec 03 2023
Previous Showing 31-40 of 43 results. Next