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

A177966 Indices m for which A177961(m) = 2 + m.

Original entry on oeis.org

2, 5, 8, 11, 12, 14, 20, 23, 26, 27, 29, 35, 41, 42, 44, 50, 53, 56, 57, 65, 68, 74, 83, 86, 87, 89, 95, 98, 113, 116, 117, 119, 125, 128, 131, 132, 134, 140, 146, 147, 155, 158, 173, 176, 177, 179, 191, 192, 194, 200, 209, 215, 221, 222, 224, 230, 233, 239, 245, 251, 252, 254
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010

Keywords

Comments

All m for which 2*m+1 is in A003627 are in the sequence:
This concerns m=2, 5, 8, 11, 14, 20, 23, 26, 29, 35,...
Union of (A003627-1)/2 and (A132235+1)/2. - Robert Israel, Jul 31 2015

Crossrefs

Programs

  • Maple
    A090368 := proc(n) A020639(2*n-1) ; end proc:
    A177961 := proc(n) (A090368(n)+A090368(n+1)) /2 ; end proc:
    isA177966 := proc(n) A177961(m) = m+2 ; end proc:
    for m from 1 to 800 do if isA177966(m) then printf("%d,",m) ; end if; end do:
    # R. J. Mathar, Oct 25 2010
    N:= 1000: # to get all terms <= N
    A1:= map(t -> (t-1)/2, select(isprime, {seq(6*i-1, i=1..(N+1)/3)})):
    A2:= map(t -> (t+1)/2, select(isprime, {seq(23+30*i,i=0..(N-12)/15)})):
    sort(convert(A1 union A2,list));
    # Robert Israel, Jul 31 2015
  • Mathematica
    M = 1000; (* to get all terms <= M *)
    A1 = (Select[Table[6 i - 1, {i, 1, (M + 1)/3}], PrimeQ] - 1)/2;
    A2 = (Select[Table[23 + 30 i, {i, 0, (M - 12)/15}], PrimeQ] + 1)/2;
    Union[A1, A2] (* Jean-François Alcover, Jul 17 2020, after Robert Israel *)

Extensions

Corrected (11, 23, 27, etc. inserted) and extended by R. J. Mathar, Oct 25 2010

A195508 Number of iterations in a Draim factorization of 2n+1.

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 1, 8, 9, 1, 11, 2, 1, 14, 15, 1, 2, 18, 1, 20, 21, 1, 23, 3, 1, 26, 2, 1, 29, 30, 1, 2, 33, 1, 35, 36, 1, 3, 39, 1, 41, 2, 1, 44, 3, 1, 2, 48, 1, 50, 51, 1, 53, 54, 1, 56, 2, 1, 3, 5, 1, 2, 63, 1, 65, 3, 1, 68, 69, 1, 5, 2, 1, 74, 75, 1, 2, 78, 1, 3, 81, 1, 83, 6, 1, 86, 2, 1, 89, 90, 1, 2, 5, 1, 95, 96, 1, 98, 99
Offset: 1

Views

Author

Frank Ellermann, Sep 19 2011

Keywords

Comments

A Draim factorization determines the smallest divisor d of 2n+1 with simple operations (integer division, remainder, +, -, *) and needs a(n)=(d-1)/2 steps.
Least m>0 for which gcd(n+1+m, n-m) > 1. [Clark Kimberling, Jul 18 2012]

Examples

			a(12)=2 because the Draim algorithm needs 2 steps to find the smallest divisor of 25=2*12+1; any a(n)=2 indicates a smallest divisor 5 of 2n+1.
		

References

  • H. Davenport, The Higher Arithmetics, 7th ed. 1999, Cambridge University Press, pp. 32-35.

Crossrefs

Cf. A090368.

Programs

  • Mathematica
    a[n_] := Module[{m = 1}, While[GCD[n + m + 1, n - m] == 1, m++]; m]; Array[a, 100] (* Amiram Eldar, Nov 06 2019 *)
  • Rexx
    SEQ = '' ;  do N = 1 to 50 ;  X = 2 * N + 1  ;  M = X
       do Y = 3 by 2 until R = 0
          Q = X % Y   ;  R = X // Y  ;  M = M - 2 * Q  ;  X = M + R
       end Y ;  SEQ = SEQ (( Y - 1 ) / 2 ) ;  end N ;  say SEQ

Formula

a(n) = (A090368(n+1)-1)/2.

A227198 Odd terms in A227197.

Original entry on oeis.org

9, 15, 25, 33, 39, 49, 57, 63, 81, 87, 95, 105, 111, 119, 121, 129, 135, 145, 153, 159, 169, 177, 183, 201, 207, 215, 225, 231, 249, 255, 265, 273, 279, 289, 297, 303, 321, 327, 335, 345, 351, 361, 369, 375, 385, 393, 399, 417, 423, 441, 447, 455, 465, 471, 489
Offset: 1

Views

Author

Antti Karttunen, Jul 06 2013

Keywords

Comments

Gives all terms n for which A090368((n+1)/2) = A112046((n-1)/2).
Contains all odd squares. What else?

Crossrefs

Programs

  • PARI
    A227196(n) = for(k=1, n, if(kronecker(k, n)<1, return(k)))
    for(n=2,1000,if((0==kronecker(A227196(n),n)&&1==(n%2)),print1(n,", ")))

A117368 a(n) = largest prime less than the smallest prime dividing (2n-1).

Original entry on oeis.org

2, 3, 5, 2, 7, 11, 2, 13, 17, 2, 19, 3, 2, 23, 29, 2, 3, 31, 2, 37, 41, 2, 43, 5, 2, 47, 3, 2, 53, 59, 2, 3, 61, 2, 67, 71, 2, 5, 73, 2, 79, 3, 2, 83, 5, 2, 3, 89, 2, 97, 101, 2, 103, 107, 2, 109, 3, 2, 5, 7, 2, 3, 113, 2, 127, 5, 2, 131, 137, 2, 7, 3, 2, 139, 149, 2, 3, 151, 2, 5, 157, 2
Offset: 2

Views

Author

Leroy Quet, Mar 10 2006

Keywords

Comments

Placing a 1 between each term of this sequence gets sequence A117365.

Examples

			a(13) = 3 because smallest prime dividing 25 is 5 and largest prime less than 5 is 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n): prevprime(factorset(2*n-1)[1]): end: seq(a(n),n=2..90); # Emeric Deutsch, Apr 22 2006
  • Mathematica
    prs=Prime[Range[50]];
    f[n_]:=NextPrime[First[Select[prs,Divisible[2 n-1,#]&]],-1]
    f/@Range[2,90]  (* Harvey P. Dale, Jan 23 2011 *)

Formula

From Robert Israel, Apr 14 2019: (Start)
a(n) = A151799(A090368(n)).
a(n) = 2*n-3 if 2*n-1 is in A006512. (End)

Extensions

More terms from Emeric Deutsch, Apr 22 2006

A177983 a(1)=3. Otherwise the average of the least prime divisors of 2n-1 and 2n+3.

Original entry on oeis.org

3, 5, 4, 9, 8, 7, 15, 11, 10, 21, 4, 13, 17, 17, 16, 18, 20, 4, 39, 23, 22, 45, 5, 25, 30, 4, 28, 32, 32, 31, 33, 35, 4, 69, 38, 37, 40, 41, 5, 81, 4, 43, 47, 5, 46, 6, 50, 4, 99, 53, 52, 105, 56, 55, 111, 4, 58, 6, 7, 5, 8, 65, 4, 129, 5, 67, 72, 71, 70, 75, 4, 7, 77, 77, 76, 78, 80, 4, 82, 83
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010

Keywords

Comments

Lim inf (n->infinity) (a(n)/n)=0.
If there exist infinitely many cousin primes (A023200), then lim sup (n->infinity) (a(n)/ n)=2.

Crossrefs

Programs

Formula

a(n) = (A090368(n)+A090368(n+2))/2 . [R. J. Mathar, Oct 25 2010]

Extensions

I corrected a(25). It should be 30 (not 31) Vladimir Shevelev, May 22 2010
More terms from R. J. Mathar, Oct 25 2010

A090370 Least m > 3 such that gcd(n-1, m*n - 1) = m-1.

Original entry on oeis.org

4, 5, 6, 4, 8, 5, 4, 6, 12, 4, 14, 8, 4, 5, 18, 4, 20, 5, 4, 12, 24, 4, 6, 14, 4, 5, 30, 4, 32, 5, 4, 18, 6, 4, 38, 20, 4, 5, 42, 4, 44, 5, 4, 24, 48, 4, 8, 6, 4, 5, 54, 4, 6, 5, 4, 30, 60, 4, 62, 32, 4, 5, 6, 4
Offset: 4

Views

Author

Lekraj Beedassy, Nov 27 2003

Keywords

Comments

Choosing a pair (m, n) so as to redefine 1 hour = m*n minutes and 1 minute = m*n seconds, then the three hands of a fictitious n-hour clock coincide in exactly m-1 equally spaced positions, including that of the n o'clock position. For instance, in the cases where we select (m, n) as (6, 11), (8, 15), (4, 25), with m*n respectively equal to 66, 120, 100 (implying 1 hour = 66 minutes, 1 minute = 66 seconds; 1 hour = 120 minutes, 1 minute = 120 seconds; 1 hour = 100 minutes, 1 minute = 100 seconds), the hands coincide in exactly 6-1=5, 8-1=7, 4-1=3 equally spaced positions on a 11-hour, 15-hour, 25-hour clock respectively.

Examples

			We have a(50)=8 because 50*8 = 400 is the least multiple of 50 such that gcd(50-1, 400-1) = 8 - 1 = 7.
		

Crossrefs

Programs

  • Maple
    A090370:=proc(n) local m; m:=4; while  (gcd(n-1, m*n - 1) <> m-1) do m:=m+1; end;  return m; end; # Søren Eilers, Aug 09 2018
  • Mathematica
    a[n_] := Block[{m=4}, While[GCD[n-1, n*m-1] != m-1, m++]; m]; Table[a[k], {k, 4, 67}] (* Giovanni Resta, Aug 09 2018 *)
  • PARI
    a(n) = {m = 4; while (gcd(n-1,m*n - 1) != m-1, m++); return (m);} \\ Michel Marcus, Jul 27 2013

Formula

a(n) = 1 + A090368(k) for n=2k. [corrected by Søren Eilers, Aug 09 2018]
a(n) = 1 + A090369(k) for n=2k+1.

Extensions

a(46) and a(49) corrected by Søren Eilers, Aug 09 2018

A133346 a(n) = smallest k such that prime(n+2) = prime(n) + (prime(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 7, 11, 0, 15, 21, 21, 31, 7, 11, 35, 9, 17, 17, 61, 9, 21, 23, 23, 77, 7, 19, 97, 101, 91, 19, 13, 41, 25, 127, 47, 139, 21, 17, 31, 11, 167, 13, 37, 11, 61, 25, 39, 7, 13, 73, 9, 227, 25, 239, 35, 15, 9, 29, 271, 269, 37, 25, 7, 61, 59, 27, 21, 13, 11, 113, 113
Offset: 1

Views

Author

Rémi Eismann, Oct 20 2007

Keywords

Examples

			For n = 1 we have prime(n) = 2, prime(n+2) = 5; there is no k such that 5 - 2 = 3 = (2 mod k), hence a(1) = 0.
For n = 6 we have prime(n) = 13, prime(n+2) = 19; 7 is the smallest k such that 19 - 13 = 6 = (13 mod k), hence a(6) = 7.
For n = 30 we have prime(n) = 113, prime(n+2) = 131; 19 is the smallest k such that 131 - 113 = 18 = (113 mod k), hence a(30) = 19.
		

Crossrefs

A133347 a(n) = smallest k such that prime(n+3) = prime(n) + (prime(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 19, 27, 29, 27, 33, 39, 47, 49, 55, 59, 19, 61, 65, 15, 29, 31, 31, 29, 29, 89, 23, 113, 41, 121, 15, 27, 47, 21, 17, 31, 15, 33, 61, 25, 57, 57, 193, 71, 43, 31, 43, 221, 73, 233, 27, 83, 257, 37, 29, 51, 51, 21, 11, 97, 289, 41, 313, 107, 67
Offset: 1

Views

Author

Rémi Eismann, Oct 20 2007

Keywords

Examples

			For n = 1 we have prime(n) = 2, prime(n+3) = 7; there is no k such that 7 - 2 = 5 = (2 mod k), hence a(1) = 0.
For n = 10 we have prime(n) = 29, prime(n+3) = 41; 17 is the smallest k such that 41 - 29 = 12 = (29 mod k), hence a(10) = 17.
For n = 53 we have prime(n) = 241, prime(n+3) = 263; 73 is the smallest k such that 263 - 241 = 22 = (241 mod k), hence a(53) = 73.
		

Crossrefs

A306536 The smallest integer k such that floor((2*n)^k/k) is an odd number.

Original entry on oeis.org

12, 3, 5, 5, 3, 7, 10, 3, 5, 11, 3, 7, 5, 3, 17, 12, 3, 5, 5, 3, 11, 10, 3, 5, 7, 3, 7, 5, 3, 11, 11, 3, 5, 5, 3, 13, 10, 3, 5, 7, 3, 10, 5, 3, 17, 7, 3, 5, 5, 3, 11, 10, 3, 5, 7, 3, 10, 5, 3, 7, 7, 3, 5, 5, 3, 15, 7, 3, 5, 12, 3, 10, 5, 3, 7
Offset: 1

Views

Author

Jinyuan Wang, Feb 22 2019

Keywords

Comments

For n > 0, there are infinitely many numbers k such that floor(n^k/k) is an odd number. For odd number n, it's obvious because k can be n^j for any j >= 0. For n = 2, k can be 3*2^j for any j >= 1.
For even number n > 2, k can be A090368(n/2)^j for any j >= 1. Proof: if odd number k makes n^k == 1 (mod k), then n^k = 1 + k*(odd number t), so floor(n^k/k) = t is an odd number. A090368(n/2)^j (j>0) is such k.

Crossrefs

Cf. A090368.

Programs

  • PARI
    a(n) = {k=1; while((2*n)^k\k%2==0, k++); k; }

Formula

a(2^j) <= 12. (This is because floor((2*2^j)^12/12) = floor(2^(12j+10)/3) = (2^(12j+10) - 1)/3 is an odd integer for all j >= 0. - Jianing Song, Feb 24 2019)
For n > 1, a(n) <= A090368(n).
Previous Showing 11-19 of 19 results.