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

A092987 A092985(n) divided by {A057237(n)}!.

Original entry on oeis.org

1, 3, 14, 585, 924, 1339975, 164604, 14454403425, 1163340147200, 478015854767451, 33644021190, 37947924636264267625, 29447897812956, 6178966019176767549393375, 1575167029892595726671372288
Offset: 1

Views

Author

Amarnath Murthy, Mar 28 2004

Keywords

Examples

			a(7) = 164604, as A092985(7) = 118514880 and A057237(n) = 6
118514880/720 =164604.
		

Crossrefs

Extensions

More terms from David Wasserman, Aug 22 2006

A126801 a(n) = smallest integer which is coprime to n and is > A057237(n).

Original entry on oeis.org

2, 3, 4, 3, 6, 5, 8, 3, 4, 3, 12, 5, 14, 3, 4, 3, 18, 5, 20, 3, 4, 3, 24, 5, 6, 3, 4, 3, 30, 7, 32, 3, 4, 3, 6, 5, 38, 3, 4, 3, 42, 5, 44, 3, 4, 3, 48, 5, 8, 3, 4, 3, 54, 5, 6, 3, 4, 3, 60, 7, 62, 3, 4, 3, 6, 5, 68, 3, 4, 3, 72, 5, 74, 3, 4, 3, 8, 5, 80, 3
Offset: 1

Views

Author

Leroy Quet, Feb 21 2007

Keywords

Comments

a(n) is also the smallest positive integer m, m > 1, which is coprime to n where (m-1) is not coprime to n.

Examples

			The integers which are coprime to 9 are 1,2,4,5,7,8,10,11,13,14,... Now 1 and 2, but not 3, are coprime to 9, so A057237(9) = 2. The smallest integer > 2 and coprime to 9 is 4. So a(9) = 4.
		

Crossrefs

Cf. A057237.

Programs

  • Maple
    A020639 := proc(n) if n = 1 then 1 ; else min(op(numtheory[divisors](n) minus {1})) ; fi ; end: A057237 := proc(n) if n = 1 then 1 ; else A020639(n)-1 ; fi: end: A126801 := proc(n) local a; for a from A057237(n)+1 do if gcd(n,a) = 1 then RETURN(a) ; fi ; od: end: seq(A126801(n),n=1..80) ; # R. J. Mathar, Nov 01 2007

Extensions

More terms from R. J. Mathar, Nov 01 2007

A193829 Irregular triangle read by rows in which row n lists the differences between consecutive divisors of n.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 1, 3, 6, 1, 2, 4, 2, 6, 1, 3, 5, 10, 1, 1, 1, 2, 6, 12, 1, 5, 7, 2, 2, 10, 1, 2, 4, 8, 16, 1, 1, 3, 3, 9, 18, 1, 2, 1, 5, 10, 2, 4, 14, 1, 9, 11, 22, 1, 1, 1, 2, 2, 4, 12, 4, 20, 1, 11, 13, 2, 6, 18, 1, 2, 3, 7, 14, 28, 1, 1, 2, 1, 4, 5, 15, 30
Offset: 2

Views

Author

Omar E. Pol, Aug 31 2011

Keywords

Comments

The sum of row n gives A000027(n-1). The product of row n gives A057449(n). Row n has length A032741(n). The final term of row n is A060681(n). It appears that the first term of row n is A057237(n).

Examples

			Written as a triangle:
1,
2,
1, 2,
4,
1, 1, 3,
6,
1, 2, 4,
2, 6,
1, 3, 5,
10,
1, 1, 1, 2, 6
		

Crossrefs

Cf. A060682 (distinct terms per row), A060680 (row minima), A060681 (row maxima).

Programs

  • Haskell
    import Data.List (genericIndex)
    a193829 n k = genericIndex a193829_tabf (n - 1) !! (k - 1)
    a193829_row n = genericIndex a193829_tabf (n - 1)
    a193829_tabf = zipWith (zipWith (-))
                           (map tail a027750_tabf') a027750_tabf'
    -- Reinhard Zumkeller, Jun 25 2015, Jun 23 2013
  • Mathematica
    Flatten[Table[Differences[Divisors[n]], {n, 2, 30}]] (* T. D. Noe, Aug 31 2011 *)

Formula

T(n,k) = A027750(n,k+1)-A027750(n,k). - R. J. Mathar, Sep 01 2011

A258409 Greatest common divisor of all (d-1)'s, where the d's are the positive divisors of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 2, 1, 46, 1, 6, 1, 2, 1, 52, 1, 2, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 2, 1, 78, 1
Offset: 2

Views

Author

Ivan Neretin, May 29 2015

Keywords

Comments

a(n) = 1 for even n; a(p) = p-1 for prime p.
a(n) is even for odd n (since all divisors of n are odd).
It appears that a(n) = A052409(A005179(n)), i.e., it is the largest integer power of the smallest number with exactly n divisors. - Michel Marcus, Nov 10 2015
Conjecture: GCD of all (p-1) for prime p|n. - Thomas Ordowski, Sep 14 2016
Conjecture is true, because the set of numbers == 1 (mod g) is closed under multiplication. - Robert Israel, Sep 14 2016
Conjecture: a(n) = A289508(A328023(n)) = GCD of the differences between consecutive divisors of n. See A328163 and A328164. - Gus Wiseman, Oct 16 2019

Examples

			65 has divisors 1, 5, 13, and 65, hence a(65) = gcd(1-1,5-1,13-1,65-1) = gcd(0,4,12,64) = 4.
		

Crossrefs

Cf. A084190 (similar but with LCM).
Looking at prime indices instead of divisors gives A328167.
Partitions whose parts minus 1 are relatively prime are A328170.

Programs

  • Haskell
    a258409 n = foldl1 gcd $ map (subtract 1) $ tail $ a027750_row' n
    -- Reinhard Zumkeller, Jun 25 2015
  • Maple
    f:= n -> igcd(op(map(`-`,numtheory:-factorset(n),-1))):
    map(f, [$2..100]); # Robert Israel, Sep 14 2016
  • Mathematica
    Table[GCD @@ (Divisors[n] - 1), {n, 2, 100}]
  • PARI
    a(n) = my(g=0); fordiv(n, d, g = gcd(g, d-1)); g; \\ Michel Marcus, May 29 2015
    
  • PARI
    a(n) = gcd(apply(x->x-1, divisors(n))); \\ Michel Marcus, Nov 10 2015
    
  • PARI
    a(n)=if(n%2==0, return(1)); if(n%3==0, return(2)); if(n%5==0 && n%4 != 1, return(2)); gcd(apply(p->p-1, factor(n)[,1])) \\ Charles R Greathouse IV, Sep 19 2016
    

A066169 Least k such that phi(k) >= n.

Original entry on oeis.org

1, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73
Offset: 1

Views

Author

Joseph L. Pe, Dec 13 2001

Keywords

Comments

Thinking of n as time, a(n) represents the first time phi catches up with i(n), where i is the identity function. a(n) - n can be seen as the lag of phi behind i at time n. The sequence of these lags begins 0 1 2 1 2 1 4 3 2 1 2 1 4 3 2 1 2 1 4 3 2 1
a(n) is the smallest number for which the reduced residue system (=RRS(a(n))) contains {1,2,...,n} as a subset; a(m) jumps at a(p)-1 and a(p) from value of p to nextprime(p); a(x)=p(n) holds {p(n-1)...p(n)-1}; p(n) is repeated p(n)-p(n-1) times. For n > 1, a(n) = p(Pi(n)+1), while a(1)=1. - Labos Elemer, May 14 2003

Examples

			a(5) = 7 since phi(7) = 6 is at least 5 and 7 is the smallest k satisfying phi(k) is greater than or equal to 5.
		

Crossrefs

Programs

  • Mathematica
    a(1)=1; Table[Prime[PrimePi[w]+1], {w, 1, 100}]
  • PARI
    { for (n=1, 1000, k=1; while (eulerphi(k) < n, k++); write("b066169.txt", n, " ", k) ) } \\ Harry J. Smith, Feb 04 2010
    
  • PARI
    print1(n=1);n=2;forprime(p=3,31,while(n++<=p,print1(", "p));n--) \\ Charles R Greathouse IV, Oct 31 2011

Formula

a(1) = 1 a(n) = p(s+1) for n in [p(s), p(s+1) - 1], where p(s) denotes the s-th prime.
For n > 1 a(n) = A007918(n+1). - Benoit Cloitre, May 04 2002
For n > 1, a(n) = A000040(A000720(n)+1), while a(1)=1. - Labos Elemer, May 14 2003

Extensions

More terms from Benoit Cloitre, May 04 2002

A092985 a(n) is the product of the first n terms of an arithmetic progression with the first term 1 and common difference n.

Original entry on oeis.org

1, 1, 3, 28, 585, 22176, 1339975, 118514880, 14454403425, 2326680294400, 478015854767451, 122087424094272000, 37947924636264267625, 14105590169042424729600, 6178966019176767549393375, 3150334059785191453342744576, 1849556085478041490537172810625
Offset: 0

Views

Author

Amarnath Murthy, Mar 28 2004

Keywords

Comments

We have the triangle (chopped versions of A076110, A162609)
1;
1 3;
1 4 7;
1 5 9 13;
1 6 11 16 21;
1 7 13 19 25 31;
...
Sequence contains the product of the terms of the rows.
a(n) = b(n-1) where b(n) = n^n*Gamma(n+1/n)/Gamma(1/n) and b(0) is limit n->0+ of b(n). - Gerald McGarvey, Nov 10 2007
Product of the entries in the first column of an n X n square array with elements 1..n^2 listed in increasing order by rows. - Wesley Ivan Hurt, Apr 02 2025

Examples

			a(5) = 1*6*11*16*21 = 22176.
		

Crossrefs

Main diagonal of A256268.

Programs

  • GAP
    List([0..20], n-> Product([0..n-1], j-> j*n+1) ); # G. C. Greubel, Mar 04 2020
  • Magma
    [1] cat [ (&*[j*n+1: j in [0..n-1]]): n in [1..20]]; // G. C. Greubel, Mar 04 2020
    
  • Maple
    a:= n-> mul(n*j+1, j=0..n-1):
    seq(a(n), n=0..20);  # Alois P. Heinz, Nov 24 2015
  • Mathematica
    Flatten[{1, Table[n^n * Pochhammer[1/n, n], {n, 1, 20}]}] (* Vaclav Kotesovec, Oct 05 2018 *)
  • PARI
    vector(21, n, my(m=n-1); prod(j=0,m-1, j*m+1)) \\ G. C. Greubel, Mar 04 2020
    
  • Sage
    [product(j*n+1 for j in (0..n-1)) for n in (0..20)] # G. C. Greubel, Mar 04 2020
    

Formula

a(n) = Product_{k=1..n} (1+(k-1)*n) = 1*(1+n)*(1+2n)*...*(n^2-n+1).
a(n) = Sum_{k=0..n} (-1)^(n-k)*Stirling1(n, k)*n^(n-k). - Vladeta Jovovic, Jan 28 2005
a(n) = n! * [x^n] 1/(1 - n*x)^(1/n) for n > 0. - Ilya Gutkovskiy, Oct 05 2018
a(n) ~ sqrt(2*Pi) * n^(2*n - 3/2) / exp(n). - Vaclav Kotesovec, Oct 05 2018

Extensions

More terms from Erich Friedman, Aug 08 2005
Offset corrected by Alois P. Heinz, Nov 24 2015

A083218 a(n) = n mod (spf(n+1)+1), where spf(n) is the smallest prime factor of n (A020639).

Original entry on oeis.org

1, 2, 0, 4, 2, 6, 1, 0, 0, 10, 2, 12, 1, 2, 0, 16, 2, 18, 1, 0, 0, 22, 2, 0, 1, 2, 0, 28, 2, 30, 1, 0, 0, 4, 2, 36, 1, 2, 0, 40, 2, 42, 1, 0, 0, 46, 2, 0, 1, 2, 0, 52, 2, 0, 1, 0, 0, 58, 2, 60, 1, 2, 0, 4, 2, 66, 1, 0, 0, 70, 2, 72, 1, 2, 0, 4, 2, 78, 1, 0, 0, 82, 2, 0, 1, 2, 0, 88, 2, 2, 1, 0, 0, 4, 2, 96
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2003

Keywords

Comments

a(n) = n iff n+1 is prime: a(A006093(k))=A006093(k).

Crossrefs

Cf. A057237.

Programs

  • Mathematica
    Table[Mod[n,FactorInteger[n+1][[1,1]]+1],{n,100}] (* Harvey P. Dale, May 28 2013 *)
Showing 1-7 of 7 results.