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

A070198 Smallest nonnegative number m such that m == i (mod i+1) for all 1 <= i <= n.

Original entry on oeis.org

0, 1, 5, 11, 59, 59, 419, 839, 2519, 2519, 27719, 27719, 360359, 360359, 360359, 720719, 12252239, 12252239, 232792559, 232792559, 232792559, 232792559, 5354228879, 5354228879, 26771144399, 26771144399, 80313433199, 80313433199
Offset: 0

Views

Author

Benoit Cloitre, May 06 2002

Keywords

Comments

Also, smallest k such that, for 0 <= i < n, i+1 divides k-i.
Suggested by Chinese Remainder Theorem. This sequence can generate others: smallest b(n) such that b(n) == i (mod (i+2)), 1 <= i <= n, gives b(1)=1 and b(n) = a(n+1)-1 for n > 1; smallest c(n) such that c(n) == i (mod (i+3)), 1 <= i <= n, gives c(1)=1, c(2)=17 and c(n) = a(n+2) - 2 for n > 2; smallest d(n) such that c(n) == i (mod (i+4)), 1 <= i <= n, gives d(1)=1, d(2)=26, d(3)=206 and d(n) = a(n+3) - 3 for n > 3, etc.
A208768(n) occurs A057820(n) times. - Reinhard Zumkeller, Mar 01 2012
From Kival Ngaokrajang, Oct 10 2013: (Start)
A070198(n-1) is m such that max(Sum_{i=1..n} m (mod i)) = A000217(n-1).
Example for n = 3:
m\i = 1 2 3 sum
1 0 1 1 2
2 0 0 2 2
3 0 1 0 1
4 0 0 1 1
5 0 1 2 3 <--max remainder sum = 3 = A000217(2)
6 0 0 0 0 first occurs at m = 5 = A070198(2)
(End)

Examples

			a(3) = 11 because 11 == 1 (mod 2), 11 == 2 (mod 3) and 11 == 3 (mod 4).
		

Crossrefs

Cf. A057825 (indices of primes). - R. J. Mathar, Jan 14 2009
Cf. A116151. - Zak Seidov, Mar 11 2014

Programs

  • Haskell
    a070198 n = a070198_list !! n
    a070198_list = map (subtract 1) $ scanl lcm 1 [2..]
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Magma
    [Exponent(SymmetricGroup(n))-1 : n in [1..30]]; /* Vincenzo Librandi, Oct 31 2014 - after Arkadiusz Wesolowski in A003418 */
    
  • Maple
    seq(ilcm($1..n) - 1, n=1..100); # Robert Israel, Nov 03 2014
  • Mathematica
    f[n_] := ChineseRemainder[ Range[0, n - 1], Range[n]]; Array[f, 28] (* or *)
    f[n_] := LCM @@ Range@ n - 1; Array[f, 28] (* Robert G. Wilson v, Oct 30 2014 *)
  • Python
    from math import lcm
    def A070198(n): return lcm(*range(1,n+2))-1 # Chai Wah Wu, May 02 2023

Formula

a(n) = lcm(1, 2, 3, ..., n+1) - 1 = A003418(n+1) - 1.

Extensions

Edited by N. J. A. Sloane, Nov 18 2007, at the suggestion of Max Alekseyev

A073606 Smaller of two consecutive integers divisible respectively by two consecutive primes.

Original entry on oeis.org

2, 8, 9, 14, 20, 21, 24, 26, 32, 38, 39, 44, 50, 54, 55, 56, 62, 68, 69, 74, 77, 80, 84, 86, 90, 92, 98, 99, 104, 110, 114, 115, 116, 122, 125, 128, 129, 134, 140, 144, 146, 152, 158, 159, 160, 164, 169, 170, 174, 175, 176, 182, 188, 189, 194, 195, 200, 204, 206
Offset: 1

Views

Author

Amarnath Murthy, Aug 04 2002

Keywords

Comments

There are arbitrarily long strings of consecutive integers in this sequence; for example, A072562(k+1) is followed by at least k-1 more consecutive members. - David Wasserman, Oct 21 2004

Examples

			54 is a term as 54 and 55 are divisible by 3 and 5 respectively. 55 is also a term as 55 and 56 are divisible by 5 and 7. 56 is also a term as 56 and 57 are divisible by 2 and 3.
		

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Flatten[ Table[ #1] & @@@ FactorInteger[n]]; NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[n + i, {i, 0, 1} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[[ k ]], 1 ]]] != {0}, k++ ]; If[ k < l + 1, Print[ n ]], {n, 2, 220} ]
    npQ[n_] := Or @@ Divisible[n + 1, NextPrime[First /@ FactorInteger[n]]]; Select[Range[2, 210], npQ[#] &] (* Jayanta Basu, Jul 03 2013 *)

Extensions

Edited by Robert G. Wilson v, Aug 07 2002

A073607 Smallest of three consecutive integers divisible by three consecutive primes respectively.

Original entry on oeis.org

8, 20, 38, 54, 68, 98, 114, 128, 158, 159, 169, 188, 218, 248, 264, 278, 308, 338, 368, 369, 398, 405, 428, 458, 474, 488, 518, 548, 578, 579, 608, 638, 668, 684, 698, 728, 758, 788, 789, 790, 791, 818, 848, 878, 894, 908, 938, 968, 998, 999, 1028, 1058
Offset: 1

Views

Author

Amarnath Murthy, Aug 04 2002

Keywords

Comments

The sequence is infinite as 30*k + 8 is a member for all k. What is the longest string of consecutive integers?

Examples

			20 is a term as 20,21 and 22 are divisible by 5,7 and 11 respectively.
114 is a term as 114, 115 and 116 are divisible by 19, 23 and 29 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[ n_Integer ] := Flatten[ Table[ #1 ] & @@@ FactorInteger[ n ]]; NextPrim[ n_ ] := Block[ {k = n + 1}, While[ !PrimeQ[ k ], k++ ]; k ]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[ n + i, {i, 0, 2} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[[ k ]], 2 ] ]] != {0}, k++ ]; If[ k < l + 1, Print[ n ]], {n, 2, 1117} ]

Extensions

Edited, corrected and extended by Robert G. Wilson v, Aug 06 2002

A072555 Smallest of four consecutive integers divisible by four consecutive primes respectively.

Original entry on oeis.org

158, 368, 578, 788, 789, 790, 998, 1208, 1418, 1628, 1838, 1944, 2048, 2258, 2468, 2678, 2888, 3098, 3099, 3308, 3518, 3728, 3938, 4148, 4254, 4358, 4367, 4568, 4778, 4988, 5198, 5408, 5409, 5618, 5795, 5828, 6038, 6248, 6458, 6564, 6668, 6797, 6878
Offset: 1

Views

Author

Robert G. Wilson v, Aug 06 2002

Keywords

Examples

			158 is a term as 158, 159, 160 and 161 are divisible by 2, 3, 5 and 7 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[ n_Integer ] := Flatten[ Table[ #1 ] & @@@ FactorInteger[ n ] ]; NextPrim[ n_ ] := Block[ {k = n + 1}, While[ !PrimeQ[ k ], k++ ]; k ]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[ n + i, {i, 0, 3} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[ [ k ] ], 3 ] ] ] != {0}, k++ ]; If[ k < l + 1, Print[ n ] ], {n, 2, 7297} ]

A075059 a(n) = 1 + lcm(1, 2, ..., n) = 1 + A003418(n).

Original entry on oeis.org

2, 2, 3, 7, 13, 61, 61, 421, 841, 2521, 2521, 27721, 27721, 360361, 360361, 360361, 720721, 12252241, 12252241, 232792561, 232792561, 232792561, 232792561, 5354228881, 5354228881, 26771144401, 26771144401, 80313433201, 80313433201
Offset: 0

Views

Author

Amarnath Murthy, Sep 08 2002

Keywords

Comments

Consider the triangle in which the n-th row contains the second run of n consecutive numbers such that the r-th term is divisible by r. Sequence gives the first column of the triangle. The first run trivially begins with 1.
Also the smallest of n consecutive integers (with the first greater than 1) divisible respectively by 1, 2, 3, ..., n. - Robert G. Wilson v, Oct 30 2014
Also the smallest number m > 1 such that m == 1 (mod i) for all 1 <= i <= n. - Franz Vrabec, Aug 18 2023

Examples

			First column of the triangle A075061:
   2;
   3,  4;
   7,  8,  9;
  13, 14, 15, 16;
  61, 62, 63, 64, 65;
  61, 62, 63, 64, 65, 66;
  ...
		

Crossrefs

Programs

Formula

a(n) = 1 + A003418(n).

Extensions

New definition from Vladeta Jovovic, Jun 16 2003
Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar
a(0)=2 prepended by Max Alekseyev, Sep 04 2015

A069561 Start of a run of n consecutive positive numbers divisible respectively by first n primes.

Original entry on oeis.org

2, 2, 8, 158, 788, 788, 210998, 5316098, 34415168, 703693778, 194794490678, 5208806743928, 138782093170508, 5006786309605868, 253579251611336438, 12551374903381164638, 142908008812141343558, 77053322014980646906358
Offset: 1

Views

Author

Amarnath Murthy, Mar 22 2002

Keywords

Comments

It is evident that from a(3) onwards terms must be congruent to 8 mod p(3)#, where p(n)# is the n-th primorial (A002110). In fact the sequence for A069561(n) == k (mod p(n)#) for k: 2, 2, 8, 788, 788, 210988, etc. This follows from the Chinese Remainder Theorem.

Examples

			a(5) = 788 as 788, 789, 790, 791 and 792 are divisible by 2, 3, 5, 7, and 11 respectively.
		

Crossrefs

Cf. A072562.

Programs

  • Mathematica
    f[n_] := ChineseRemainder[-Range[0, n - 1], Prime[Range[n]]]; Array[f, 17, 2] (* Robert G. Wilson v, Jan 13 2012 *)
    (* This code uses memoization in calculating the coeff for the primorial assoc'ed with a(n) value to generate a(n+1), producing 1000 terms in under one second (on a 2017 Costco Dell 64-bit Windows 10 machine)*)
    q[1] =0; q[2] =0;
    q[n_]:= (ModularInverse[Product[Prime[i], {i,1,n-1}], Prime[n]] * Mod[Prime[n]-n+1-g[n-1], Prime[n]])  // Mod[#, Prime[n]]&;
    g[1] =2; g[2] =2;
    g[r_] :=g[r]= g[r-1] + q[r] * Product[Prime[i], {i,1,r-1}];
    Array[g, 1000]
    (* Christopher Lamb, Oct 19 2021 *)
  • PARI
    a(n)=lift(chinese(vector(max(n,2),k,Mod(1-k,prime(k))))) \\ Charles R Greathouse IV, Jun 20 2015

Formula

log a(n) << n log n. - Charles R Greathouse IV, Jun 20 2015

Extensions

More terms to a(15) from Sascha Kurz, Mar 23 2002
Edited and extended by Robert G. Wilson v, Aug 09 2002

A072722 Smallest of 6 consecutive integers divisible respectively by 6 consecutive primes.

Original entry on oeis.org

788, 30818, 60848, 90878, 120908, 150938, 180968, 210998, 210999, 241028, 271058, 301088, 331118, 361148, 391178, 421208, 451238, 466254, 466255, 481268, 511298, 541328, 571358, 601388, 631418, 661448, 691478, 721508, 721509, 751538
Offset: 1

Views

Author

Robert G. Wilson v, Aug 07 2002

Keywords

Examples

			30818 is a term as 30818, 30818, 30819, 30820, 30821 and 30822 are divisible by 2, 3, 5, 7 and 11 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Flatten[ Table[ #1] & @@@ FactorInteger[n]]; NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[n + i, {i, 0, 5} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[[ k ]], 5 ]]] != {0}, k++ ]; If[ k < l + 1, Print[ n ]], {n, 2, 811597} ]

A072730 Smallest of 5 consecutive integers divisible respectively by 5 consecutive primes.

Original entry on oeis.org

788, 789, 3098, 5408, 7718, 10028, 12338, 14648, 15804, 16958, 19268, 21578, 23888, 26198, 28508, 30818, 30819, 33128, 35438, 37748, 40058, 40830, 42368, 44678, 45834, 46988, 49298, 51608, 53918, 56228, 58538, 60848, 60849, 63158
Offset: 1

Views

Author

Robert G. Wilson v, Aug 07 2002

Keywords

Examples

			3098 is a term as 3098, 3099, 3100, 3101 and 3102 are divisible by 2, 3, 5, 7 and 11 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Flatten[ Table[ #1] & @@@ FactorInteger[n]]; NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[n + i, {i, 0, 4} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[[ k ]], 4 ]]] != {0}, k++ ]; If[ k < l + 1, Print[ n ]], {n, 2, 72397} ]
    cicpQ[n_]:=Module[{num=Range[n,n+4],pr=PrimePi[n+4]-4},Total [Boole[ AllTrue[ #, IntegerQ]&/@Table[num/Prime[Range[k,k+4]],{k,pr}]]]>0]; Select[ Range[ 64000],cicpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 11 2019 *)

A072760 Smallest of 7 consecutive integers divisible respectively by 7 consecutive primes.

Original entry on oeis.org

210998, 466254, 721508, 1232018, 1742528, 2253038, 2763548, 3274058, 3784568, 4295078, 4805588, 5316098, 5316099, 5826608, 6337118, 6847628, 7358138, 7868648, 8379158, 8889668, 9400178, 9910688, 10165944, 10421198, 10931708
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2002

Keywords

Examples

			210998 is a term as 210998, 210999, 211000, 211001, 211002, 211003 and 211004 are divisible by 2, 3, 5, 7, 11, 13 and 17 respectively.
		

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Flatten[ Table[ #1] & @@@ FactorInteger[n]]; NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ p = f[ n ]; l = Length[ p ]; t = Table[n + i, {i, 0, 6} ]; k = 1; While[ k < l + 1 && Union[ Mod[ t, NestList[ NextPrim, p[[ k ]], 6 ]]] != {0}, k++ ]; If[ k < l + 1, Print[ n ]], {n, 2, 811597} ]

A321024 Let j be one of the prime factors of k. Sequence lists numbers k such that the prime before j is a prime factor of k+1.

Original entry on oeis.org

3, 5, 9, 14, 15, 20, 21, 27, 33, 35, 39, 45, 49, 50, 51, 55, 57, 63, 65, 69, 75, 80, 81, 84, 87, 93, 95, 99, 105, 110, 111, 117, 119, 123, 125, 129, 132, 135, 140, 141, 147, 152, 153, 154, 155, 159, 165, 170, 171, 177, 183, 185, 189, 195, 200, 201, 207, 208, 209
Offset: 1

Views

Author

Paolo P. Lava, Oct 26 2018

Keywords

Comments

Contains arbitrarily long strings of consecutive integers. Here are the shortest ones arranged by increasing numbers of terms:
{3}
{14,15}
{49,50,51}
{152,153,154,155}
{10217,10218,10219,10220,10221}
{634842, 634843, 634844, 634845, 634846, 634847}
{123945, 123946, 123947, 123948, 123949, 123950, 123951}
{2852055, 2852056, 2852057, 2852058, 2852059, 2852060, 2852061, 2852062}
{49057063, 49057064, 49057065, 49057066, 49057067, 49057068, 49057069, 49057070, 49057071}, etc.

Examples

			152 is divisible by 19 and 153 by 17;
153 is divisible by 3 and 154 by 2;
154 is divisible by 7 and 155 by 5;
155 is divisible by 5 and 156 by 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(n) local a,k;
    a:=factorset(n) minus {2};
    for k from 1 to nops(a) do if frac((n+1)/prevprime(a[k]))=0
    then RETURN(n); fi; od; end: seq(P(i),i=2..300);
  • Mathematica
    Select[Range[210], Function[k, AnyTrue[DeleteCases[NextPrime[ FactorInteger[k][[All, 1]], -1 ], p_ /; p < 0], Mod[k + 1, #] == 0 &]]] (* Michael De Vlieger, Oct 31 2018 *)
  • PARI
    is(n) = my(f = factor(n>>valuation(n, 2))[,1]); n++; for(i = 1, #f~, if(n % precprime(f[i]-1) == 0, return(1))); 0 \\ David A. Corneth, Oct 30 2018
Showing 1-10 of 11 results. Next