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 23 results. Next

A154998 Primes p such that p^2 divides A048861((p-1)/2).

Original entry on oeis.org

3, 2001907169
Offset: 1

Views

Author

Max Alekseyev, Jan 18 2009

Keywords

Comments

No other terms below 10^11.

Crossrefs

Programs

  • PARI
    { forprime(p=3,10^11, if(Mod((p-1)/2,p^2)^((p-1)/2)==1, print(p);)) }

Formula

Elements of A125854 congruent to 1 or 3 modulo 8, i.e., primes p such that p == 1 or 3 (mod 8) and 2^(p-1) == 1+p (mod p^2).

Extensions

Edited by Max Alekseyev, Oct 13 2009

A010879 Final digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
Offset: 0

Views

Author

Keywords

Comments

Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
a(n) = n^5 mod 10. - Zerinvary Lajos, Nov 04 2009

Crossrefs

Cf. A008959, A008960, A070514. - Doug Bell, Jun 15 2015
Partial sums: A130488. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487.

Programs

Formula

a(n) = n mod 10.
Periodic with period 10.
From Hieronymus Fischer, May 31 and Jun 11 2007: (Start)
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (Sum_{k=1..9} k*x^k)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x*(9*x^10-10*x^9+1)/((1-x^10)*(1-x)^2).
a(n) = n mod 2+2*(floor(n/2)mod 5) = A000035(n) + 2*A010874(A004526(n)).
Also: a(n) = n mod 5+5*(floor(n/5)mod 2) = A010874(n)+5*A000035(A002266(n)). (End)
a(n) = 10*{n/10}, where {x} means fractional part of x. - Enrique Pérez Herrero, Jul 30 2009
a(n) = n - 10*A059995(n). - Reinhard Zumkeller, Jul 26 2011
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015

Extensions

Formula section edited for better readability by Hieronymus Fischer, Jun 13 2012

A014566 Sierpiński numbers of the first kind: n^n + 1.

Original entry on oeis.org

2, 2, 5, 28, 257, 3126, 46657, 823544, 16777217, 387420490, 10000000001, 285311670612, 8916100448257, 302875106592254, 11112006825558017, 437893890380859376, 18446744073709551617, 827240261886336764178, 39346408075296537575425, 1978419655660313589123980
Offset: 0

Views

Author

Keywords

Comments

Sierpiński primes of the form n^n + 1 are {2,5,257,...} = A121270. The prime p divides a((p-1)/2) for p = {5,7,13,23,29,31,37,47,53,61,71,...} = A003628 Primes congruent to {5, 7} mod 8. p^2 divides a((p-1)/2) for prime p = {29,37,3373,...}. - Alexander Adamchuk, Sep 11 2006
n divides a(n-1) for even n, or 2n divides a(2n-1). a(2n-1)/(2n) = A124899(n) = {1, 7, 521, 102943, 38742049, 23775972551, 21633936185161, 27368368148803711, 45957792327018709121, ...}. 2^n divides a(2^n-1). A014566[2^n - 1] / 2^n = A081216[2^n - 1] = A122000[n] = {1, 7, 102943, 27368368148803711, 533411691585101123706582594658103586126397951, ...}. p+1 divides a(p) for prime p. a(p)/(p+1) = A056852[n] = {7, 521, 102943, 23775972551, 21633936185161, ...}. p^2 divides a((p-1)/2) for prime p = {29, 37, 3373} = A121999(n). - Alexander Adamchuk, Nov 12 2006

References

  • Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • Maohua Le, Primes in the sequences n^n+1 and n^n-1, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, pp. 156-157.
  • Paulo Ribenboim, The Book of Prime Number Records, 2nd ed. New York: Springer-Verlag, p. 74, 1989.

Crossrefs

Programs

Formula

For n>0, resultant of x^n+1 and nx-1. - Ralf Stephan, Nov 20 2004
E.g.f.: exp(x) + 1/(1+LambertW(-x)). - Vaclav Kotesovec, Dec 20 2014
Sum_{n>=1} 1/a(n) = A134883. - Amiram Eldar, Nov 15 2020

Extensions

More terms from Erich Friedman

A006486 a(n) = largest prime factor of n^n - 1.

Original entry on oeis.org

3, 13, 17, 71, 43, 4733, 241, 757, 9091, 1806113, 20593, 1803647, 8108731, 39225301, 6700417, 2699538733, 465841, 109912203092239643840221, 222361, 227633407, 285451051007, 1920647391913, 1134793633, 50150933101, 3574533119, 12557612956332313, 1100860153
Offset: 2

Views

Author

Dennis S. Kluk (mathemagician(AT)ameritech.net)

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Max(PrimeDivisors(n^n-1)):n in [2..28]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[Max@Transpose[FactorInteger[n^n - 1]][[1]], {n, 2, 28}] (* Arkadiusz Wesolowski, Aug 06 2012 *)
  • PARI
    for(k=2, 28, my(x=factor(k^k-1), f=x[#x[, 1], 1]); print1(f,", ")) \\ Hugo Pfoertner, Aug 23 2019
    

Formula

a(n) = A006530(A048861(n)). - Michel Marcus, Aug 24 2019

Extensions

Corrected by T. D. Noe, Nov 14 2006
5 more terms from Arkadiusz Wesolowski, Aug 06 2012
Terms up to a(126) in b-file added by Sean A. Irvine, Apr 25 2017
Terms a(127)-a(138) in b-file added by Max Alekseyev, Aug 26 2021

A206455 T(n,k) = number of 0..k arrays of length n avoiding the consecutive pattern 0..k.

Original entry on oeis.org

2, 3, 3, 4, 9, 4, 5, 16, 26, 5, 6, 25, 64, 75, 6, 7, 36, 125, 255, 216, 7, 8, 49, 216, 625, 1016, 622, 8, 9, 64, 343, 1296, 3124, 4048, 1791, 9, 10, 81, 512, 2401, 7776, 15615, 16128, 5157, 10, 11, 100, 729, 4096, 16807, 46655, 78050, 64257, 14849, 11, 12, 121, 1000
Offset: 1

Views

Author

R. H. Hardin, Feb 07 2012

Keywords

Examples

			Table starts
  2    3     4      5       6       7        8        9        10        11 ...
  3    9    16     25      36      49       64       81       100       121 ...
  4   26    64    125     216     343      512      729      1000      1331 ...
  5   75   255    625    1296    2401     4096     6561     10000     14641 ...
  6  216  1016   3124    7776   16807    32768    59049    100000    161051 ...
  7  622  4048  15615   46655  117649   262144   531441   1000000   1771561 ...
  8 1791 16128  78050  279924  823542  2097152  4782969  10000000  19487171 ...
  9 5157 64257 390125 1679508 5764787 16777215 43046721 100000000 214358881 ...
  ...
		

Crossrefs

Columns 2, 3... are A076264, A206450, A206451, A206452.
Subdiagonal 1 is A048861(n+1)

Programs

  • Maple
    N:= 20: # for the first N antidiagonals
    for k from 1 to N-1 do
      F[k]:= gfun:-rectoproc({a(n)=(k+1)*a(n-1) - a(n-k-1), seq(a(j)=(k+1)^j,j=1..k),a(k+1)=(k+1)^(k+1)-1},a(n),remember)
    od:
    seq(seq(F[m-j](j),j=1..m-1),m=1..N); # Robert Israel, Dec 17 2017
  • Mathematica
    nmax = 20;
    col[k_] := col[k] = Module[{a}, a[n_ /; n>2] := a[n] = (k+1)*a[n-1]-a[n-k-1]; a[0]=1; a[1]=k+1; a[2]=(k+1)^2; a[_?Negative]=0; Array[a, nmax]];
    T[n_, k_] := If[k == 1, n+1, col[k][[n]]];
    Table[T[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jul 22 2022 *)

Formula

Empirical: T(n,k) = sum{i=0..floor(n/(k+1))} ( (-1)^i * (k+1)^(n-(k+1)*i) * binomial(n-k*i,i) ) (after A076264)
Empirical for column k: a(n) = (k+1)*a(n-1) - a(n-(k+1)).
Formula for column k verified by Robert Israel, Dec 17 2017 (see link).

A121270 Prime Sierpinski numbers of the first kind: primes of the form k^k+1.

Original entry on oeis.org

2, 5, 257
Offset: 1

Views

Author

Alexander Adamchuk, Aug 23 2006

Keywords

Comments

Sierpinski proved that k>1 must be of the form 2^(2^j) for k^k+1 to be a prime. All a(n) > 2 must be the Fermat numbers F(m) with m = j+2^j = A006127(j). [Edited by Jeppe Stig Nielsen, Jul 09 2023]

References

  • See e.g. pp. 156-157 in M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001. - Walter Nissen, Mar 20 2010

Crossrefs

Primes of form b*k^k + 1: this sequence (b=1), A216148 (b=2), A301644 (b=3), A301641 (b=4), A301642 (b=16).

Programs

  • Mathematica
    Do[f=n^n+1;If[PrimeQ[f],Print[{n,f}]],{n,1,1000}]
  • PARI
    for(n=1,9,if(ispseudoprime(t=n^n+1),print1(t", "))) \\ Charles R Greathouse IV, Feb 01 2013

Extensions

Definition rewritten by Walter Nissen, Mar 20 2010

A344870 Number of distinct prime factors of n^n-1.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 6, 6, 5, 4, 8, 5, 5, 7, 7, 4, 8, 3, 11, 9, 8, 6, 12, 11, 8, 9, 11, 9, 14, 4, 12, 8, 13, 10, 18, 9, 8, 10, 15, 7, 16, 6, 14, 17, 8, 5, 18, 17, 13, 14, 17, 7, 15, 10, 18, 8, 10, 5, 26, 7, 9, 14, 19, 14, 17, 9, 15, 11, 19, 7, 29, 12, 7, 11, 19, 12, 21, 8, 22, 25, 6, 6, 26, 16, 9, 15, 21, 8, 26, 11, 15, 13, 11, 11, 25, 8, 12, 14, 26
Offset: 2

Views

Author

Seiichi Manyama, May 31 2021

Keywords

Crossrefs

Programs

  • Magma
    [#PrimeDivisors(n^n-1): n in [2..100]];
  • Mathematica
    a[n_] := PrimeNu[n^n - 1]; Array[a, 45, 2] (* Amiram Eldar, Jun 01 2021 *)
  • PARI
    a(n) = omega(n^n-1);
    

Formula

a(n) = A001221(A048861(n)).

A334167 a(n) is the number of divisors of n^n-1.

Original entry on oeis.org

2, 4, 8, 12, 16, 16, 96, 128, 48, 16, 256, 48, 32, 128, 128, 40, 512, 12, 2048, 768, 256, 64, 6144, 4096, 768, 512, 4096, 768, 24576, 16, 6144, 768, 8192, 1024, 262144, 1152, 256, 1024, 49152, 256, 65536, 64, 24576, 196608, 384, 32, 393216, 327680, 12288, 24576
Offset: 2

Views

Author

Todor Szimeonov, Apr 17 2020

Keywords

Comments

25 values of the first 40 are powers of 2.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, n^n - 1]; a /@ Range[2, 45] (* Giovanni Resta, Apr 17 2020 *)
  • PARI
    a(n) = numdiv(n^n-1); \\ Michel Marcus, Apr 17 2020

Formula

a(n) = A000005(A048861(n)).

Extensions

More terms from Giovanni Resta, Apr 17 2020

A309941 Number of prime factors of n^n - 1, counted with multiplicity.

Original entry on oeis.org

1, 2, 3, 4, 4, 4, 7, 8, 6, 4, 8, 6, 5, 7, 7, 7, 10, 4, 11, 10, 8, 6, 13, 13, 11, 9, 13, 10, 15, 4, 13, 12, 13, 10, 18, 11, 8, 10, 16, 9, 16, 6, 15, 18, 9, 5, 19, 20, 14, 15, 17, 8, 16, 12, 18, 10, 10, 5, 26, 8, 10, 14, 20, 19, 17, 9, 17, 12, 19, 7, 29, 15, 8, 11, 20, 13, 21, 8
Offset: 2

Views

Author

Hugo Pfoertner, Aug 24 2019

Keywords

Examples

			a(3) = 2: 3^3 - 1 = 26 = 2 * 13.
a(5) = 4: 5^5 - 1 = 3124 = 2^2 * 11 * 71.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeOmega[n^n - 1]; Array[a, 45, 2] (* Amiram Eldar, Jul 04 2024 *)
  • PARI
    for(k=2, 50, print1(bigomega(k^k-1),", "))

A366819 a(n) is the sum of the divisors of n^n-1.

Original entry on oeis.org

4, 42, 432, 6048, 67584, 1704240, 38054016, 967814400, 16203253248, 513593801496, 15743437516800, 720045832568832, 19146847615988736, 835966563470742528, 31421980989189888768, 1602925310146310674200, 52064744760120508416000, 4286575920597346109768658
Offset: 2

Views

Author

Sean A. Irvine, Oct 24 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSigma[1, #^# - 1] &, 18, 2] (* Michael De Vlieger, Oct 24 2023 *)
  • PARI
    a(n) = sigma(n^n-1);

Formula

a(n) = A000203(A048861(n)).
Showing 1-10 of 23 results. Next