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.

A023037 a(n) = n^0 + n^1 + ... + n^(n-1), or a(n) = (n^n-1)/(n-1) with a(0)=0; a(1)=1.

Original entry on oeis.org

0, 1, 3, 13, 85, 781, 9331, 137257, 2396745, 48427561, 1111111111, 28531167061, 810554586205, 25239592216021, 854769755812155, 31278135027204241, 1229782938247303441, 51702516367896047761, 2314494592664502210319, 109912203092239643840221
Offset: 0

Views

Author

Keywords

Comments

For prime n, a(n) is conjectured to be the period of Bell numbers (mod n). See A054767. - T. D. Noe, Oct 12 2007
For prime n, a(n) is a multiple of the period of Bell numbers mod n (and conjectured to be exactly the period, as mentioned above). - Charles R Greathouse IV, Jul 31 2012
For n >= 1, a(n) is the number whose base n representation is a string of n ones. For example, 11111 in base 5 is a(5) = 781. - Melvin Peralta, May 23 2016
For n > 0, n^(a(n)-1) == 1 (mod a(n)), so for n > 1, a(n) is a prime or a Fermat pseudoprime to base n. - Thomas Ordowski, Mar 15 2021

Examples

			a(3) = 3^0 + 3^1 + 3^2 = 1+3+9 = 13.
		

Crossrefs

Cf. A001039, A054767, A088790 (n such that a(n) is prime), A125118.

Programs

Formula

a(n) = A125118(n,n-1) for n>1. - Reinhard Zumkeller, Nov 21 2006
a(n) = [x^n] x/((1 - x)*(1 - n*x)). - Ilya Gutkovskiy, Oct 04 2017

Extensions

Entry improved by Tobias Nipkow (nipkow(AT)in.tum.de).

A214812 Largest prime factor of (p^p-1)/(p-1) where p = prime(n).

Original entry on oeis.org

3, 13, 71, 4733, 1806113, 1803647, 2699538733, 109912203092239643840221, 1920647391913, 549334763, 568972471024107865287021434301977158534824481, 41903425553544839998158239, 5926187589691497537793497756719, 19825223972382274003506149120708429799166030881820329892377241, 194707033016099228267068299180244011637
Offset: 1

Views

Author

N. J. A. Sloane, Jul 31 2012

Keywords

Crossrefs

Programs

  • Mathematica
    FactorInteger[#][[-1,1]]&/@Table[(p^p-1)/(p-1),{p,Prime[Range[15]]}] (* Harvey P. Dale, Aug 27 2016 *)
  • PARI
    a(n) = my(p=prime(n)); vecmax(factor((p^p-1)/(p-1))[,1]); \\ Daniel Suteu, May 26 2022

Formula

a(n) = A006530(A001039(n)). - Daniel Suteu, May 26 2022

A056852 a(n) = (p^p + 1)/(p + 1), where p = prime(n).

Original entry on oeis.org

7, 521, 102943, 23775972551, 21633936185161, 45957792327018709121, 98920982783015679456199, 870019499993663001431459704607, 85589538438707037818727607157700537549449, 533411691585101123706582594658103586126397951, 277766709362573247738903423315679814371773581141321037961
Offset: 2

Views

Author

Robert G. Wilson v, Aug 30 2000

Keywords

Comments

From Lorenzo Sauras Altuzarra, Nov 27 2022: (Start)
Are all terms pairwise coprime? If so, they induce a permutation of the natural numbers, as Fermat numbers do (see A343767).
Are all terms squarefree?
A342173(n) <= length(a(n)) = A055642(a(n)) (the proof is due to Jinyuan Wang). (End)

Crossrefs

Programs

  • Maple
    a := n -> (ithprime(n)^ithprime(n)+1)/(ithprime(n)+1): # Lorenzo Sauras Altuzarra, Nov 27 2022
  • Mathematica
    Table[ (Prime[ n ]^Prime[ n ] + 1)/(Prime[ n ] + 1), {n, 2, 11} ]
    (#^#+1)/(#+1)&/@Prime[Range[2,20]] (* Harvey P. Dale, Apr 23 2015 *)

Formula

From Lorenzo Sauras Altuzarra, Nov 27 2022: (Start)
a(n) = Sum_{k=0..prime(n)-1} (-prime(n))^k.
a(n) = F(prime(n), 1)/F(prime(n), 0), where F(b, n) = b^b^n + 1 (i.e., F(b, n) is the n-th base-b Fermat number, see A129290). (End)

A214811 Triangle read by rows: row n lists prime factors of (p^p-1)/(p-1) where p = prime(n).

Original entry on oeis.org

3, 13, 11, 71, 29, 4733, 15797, 1806113, 53, 264031, 1803647, 10949, 1749233, 2699538733, 109912203092239643840221, 461, 1289, 831603031789, 1920647391913, 59, 16763, 84449, 2428577, 14111459, 58320973, 549334763, 568972471024107865287021434301977158534824481, 149, 1999, 7993, 16651, 17317, 10192715656759, 41903425553544839998158239
Offset: 1

Views

Author

N. J. A. Sloane, Jul 31 2012

Keywords

Examples

			Triangle begins:
[3]
[13]
[11, 71]
[29, 4733]
[15797, 1806113]
[53, 264031, 1803647]
[10949, 1749233, 2699538733]
[109912203092239643840221]
[461, 1289, 831603031789, 1920647391913]
[59, 16763, 84449, 2428577, 14111459, 58320973, 549334763]
[568972471024107865287021434301977158534824481]
[149, 1999, 7993, 16651, 17317, 10192715656759, 41903425553544839998158239]
...
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local i,t1,p,B,F;
    p:=ithprime(n);
    B:=(p^p-1)/(p-1);
    F:=ifactors(B)[2];
    lprint(n,p,B,F);
    t1:=[seq(F[i][1],i=1..nops(F))];
    sort(t1);
    end;

A351657 Period of the Fibonacci n-step sequence mod n.

Original entry on oeis.org

1, 3, 13, 10, 781, 728, 137257, 36, 273, 212784, 28531167061, 42640
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 16 2022

Keywords

Comments

From Chai Wah Wu, Feb 23 2022: (Start)
a(14) = 92269645680
a(15) = 4976066589192413
a(16) = 136
a(18) = 306281976
(End)

Examples

			For n = 4, take the tetranacci sequence (A000078), 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, ... (mod 4), which gives 0, 0, 0, 1, 1, 2, 0, 0, 3, 1, 0, 0, 0, 1, 1, 2, ... This repeats a pattern of length 10, so a(4) = 10.
		

Crossrefs

Programs

  • Python
    from math import lcm
    from itertools import count
    from sympy import factorint
    def f(n,pe): # period of the Fibonacci n-step sequence mod pe
        a = b = (0,)*(n-1)+(1%pe,)
        s = 1 % pe
        for m in count(1):
            b, s = b[1:] + (s,), (s+s-b[0]) % pe
            if a == b:
                return m
    def A351657(n): return 1 if n == 1 else lcm(*(f(n,p**e) for p, e in factorint(n).items())) # Chai Wah Wu, Feb 23-27 2022

Formula

From Chai Wah Wu, Feb 22 2022: (Start)
Conjecture 1: a(p) = (p^p-1)/(p-1) for p prime, i.e., a(A000040(n)) = A001039(n).
Conjecture 2: a(2^k) = 2^(k-1)*(1+2^k) = A007582(k).
Conjecture 3 (which implies Conjectures 1 and 2): a(p^k) = (p^(p*k)-1)*p^(k-1)/(p^k-1) for k > 0 and prime p.
(End)

Extensions

a(11)-a(12) from Chai Wah Wu, Feb 22 2022

A173470 Semiprimes in A023037.

Original entry on oeis.org

85, 781, 137257, 28531167061
Offset: 1

Views

Author

Keywords

Comments

The terms a(5) etc. have at least 63 digits (if they exist), so the pattern of terms does not continue as in A001039. [From R. J. Mathar, Feb 27 2010]

Programs

  • Mathematica
    f1[n_]:=Module[{s=0},Do[s+=n^a,{a,0,n-1}];s]; f2[n_]:=Last/@FactorInteger[n]=={1,1}||Last/@FactorInteger[n]=={2}; Select[Table[f1[n],{n,50}],f2[ # ]&]

A248843 Table read by rows in which row n lists divisors of (p^p-1)/(p-1) where p = prime(n).

Original entry on oeis.org

1, 3, 1, 13, 1, 11, 71, 781, 1, 29, 4733, 137257, 1, 15797, 1806113, 28531167061, 1, 53, 264031, 1803647, 13993643, 95593291, 476218721057, 25239592216021, 1, 10949, 1749233, 2699538733, 19152352117, 29557249587617, 4722122236541789
Offset: 1

Views

Author

Jean-François Alcover, Dec 03 2014

Keywords

Examples

			Table begins:
  [1, 3],
  [1, 13],
  [1, 11, 71, 781],
  [1, 29, 4733, 137257],
  [1, 15797, 1806113, 28531167061],
  [1, 53, 264031, 1803647, 13993643, 95593291, 476218721057, 25239592216021],
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; Divisors[(p^p - 1)/(p - 1)], {n, 1, 10}] // Flatten

A354226 a(n) is the number of distinct prime factors of (p^p - 1)/(p - 1) where p = prime(n).

Original entry on oeis.org

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

Views

Author

Luis H. Gallardo, May 20 2022

Keywords

Comments

a(34) > 3, and depends on the full factorization of the 296-digit composite number (139^139 - 1)/138. - Tyler Busby, Jan 22 2023
Sequence continues as ?, 8, ?, 5, 8, 4, 5, ?, 8, ?, 8, 7, 6, 3, 3, ..., where ? represents uncertain terms. - Tyler Busby, Jan 22 2023

Examples

			a(3)=2, since (5^5 - 1)/(5 - 1) = 11*71.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=prime(n)); omega((p^p-1)/(p-1)); \\ Michel Marcus, May 22 2022
    
  • Python
    from sympy import factorint, prime
    def a(n): p = prime(n); return len(factorint((p**p-1)//(p-1)))
    print([a(n) for n in range(1, 12)]) # Michael S. Branicky, May 23 2022

Formula

a(n) = A001221(A001039(n)).

Extensions

a(18)-a(33) from Amiram Eldar, May 20 2022
Showing 1-8 of 8 results.