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

A177965 Indices m for which A177961(m) - m = 1.

Original entry on oeis.org

1, 4, 7, 10, 16, 19, 22, 31, 34, 37, 40, 49, 52, 55, 64, 70, 76, 79, 82, 91, 97, 100, 106, 112, 115, 121, 136, 139, 142, 154, 157, 166, 169, 175, 184, 187, 190, 199, 205, 211, 217, 220, 229, 232, 244, 250, 262, 271, 274, 286, 289, 301, 304, 307, 310, 316, 322, 331, 337, 346
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010

Keywords

Comments

1 is the smallest value of |A177961(m) - m|.

Crossrefs

Programs

  • Maple
    1,op(map(t -> 3*t+1, select(t -> isprime(6*t+1),[$1..1000]))); # Robert Israel, Jul 31 2015
  • Mathematica
    Position[Table[If[m == 1, 2, Mean[{FactorInteger[2 m - 1][[1, 1]], FactorInteger[2 m + 1][[1, 1]]}]] - m, {m, 346}], n_ /; n == 1] // Flatten (* Michael De Vlieger, Aug 02 2015 *)

Formula

a(n) = (A002476(n-1) + 1)/2, n > 1.

Extensions

More terms from R. J. Mathar, Oct 25 2010

A177964 Indices m for which A177961(m) = 4.

Original entry on oeis.org

2, 13, 17, 28, 32, 43, 47, 58, 62, 73, 77, 88, 92, 103, 107, 118, 122, 133, 137, 148, 152, 163, 167, 178, 182, 193, 197, 208, 212, 223, 227, 238, 242, 253, 257, 268, 272, 283, 287, 298, 302, 313, 317, 328, 332, 343, 347, 358, 362, 373, 377, 388, 392, 403, 407, 418, 422
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010

Keywords

Comments

Note that 4 is the smallest value of A177961.

Crossrefs

Cf. A177961.

Programs

  • Magma
    [15*(n/2-1/4)+7*(-1)^n/4: n in [1..60]]; // Vincenzo Librandi, Aug 01 2015
  • Maple
    seq(seq(15*i+j, j=[2,13]),i=0..100); # Robert Israel, Jul 31 2015
  • Mathematica
    Table[15 (n/2 - 1/4) + 7 (-1)^n/4, {n, 60}] (* Vincenzo Librandi, Aug 01 2015 *)
    LinearRecurrence[{1,1,-1},{2,13,17},80] (* Harvey P. Dale, Nov 01 2023 *)

Formula

a(n+2) = a(n)+15.
a(n) == (-1)^n (mod 3).
a(n) = 15*(n/2-1/4)+7*(-1)^n/4. - R. J. Mathar, Oct 25 2010
k such that k == 2 or -2 (mod 15). - Robert Israel, Jul 31 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(3*Pi/10)*Pi/15 = sqrt(1+2/sqrt(5))*Pi/15. - Amiram Eldar, Feb 28 2023
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = cos(3*Pi/10)*sec(11*Pi/30).
Product_{n>=1} (1 + (-1)^n/a(n)) = sec(Pi/15)/2. (End)

Extensions

More terms from R. J. Mathar, Oct 25 2010

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

A177985 A177983(n) - A177961(n).

Original entry on oeis.org

1, 1, -2, 4, 1, -5, 7, 1, -8, 10, -9, -1, 13, 1, -14, 1, 16, -17, 19, 1, -20, 22, -20, -2, 25, -24, -1, 28, 1, -29, 1, 31, -32, 34, 1, -35, 2, 36, -38, 40, -39, -1, 43, -41, -2, 1, 46, -47, 49, 1, -50, 52, 1, -53, 55, -54, -1, 2, 2, -4, 1, 61, -62, 64, -62, -2, 67, 1, -68, 4, -3, -1, 73, 1, -74, 1, 76, -77, 2, 78
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010

Keywords

Crossrefs

Formula

a(3k+1)+a(3k+2)+a(3k+3)=0, k>=0.

A104278 Numbers m such that 2m+1 and 2m-1 are not primes.

Original entry on oeis.org

13, 17, 25, 28, 32, 38, 43, 46, 47, 58, 59, 60, 61, 62, 67, 71, 72, 73, 77, 80, 85, 88, 92, 93, 94, 101, 102, 103, 104, 107, 108, 109, 110, 118, 122, 123, 124, 127, 130, 133, 137, 143, 144, 145, 148, 149, 150, 151, 152, 160, 161, 162, 163, 164, 167, 170, 171, 172
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Complement of A147820. - Omar E. Pol, Nov 17 2008
m is in the sequence iff A177961(m)Vladimir Shevelev, May 16 2010

Examples

			a(1)=13 is the first number satisfying simultaneously the two rules.
		

Crossrefs

Intersection of A047845 and A104275.

Programs

  • Haskell
    a104278 n = a104278_list !! (n-1)
    a104278_list = [m | m <- [1..],
                        a010051' (2 * m - 1) == 0 && a010051' (2 * m + 1) == 0]
    -- Reinhard Zumkeller, Aug 04 2015
    
  • Mathematica
    Select[ Range[300], !PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
    Select[Range[300],NoneTrue[2#+{1,-1},PrimeQ]&] (* The program uses the NoneTrue function from Mathematica version 10 *)  (* Harvey P. Dale, Jul 07 2015 *)
  • PARI
    select( {is_A104278(n)=!isprime(2*n-1)&&!isprime(2*n+1)}, [1..222]) \\ M. F. Hasler, Apr 29 2024

Formula

a(n) = (A025583-1)/2. - Bill McEachen, Feb 05 2025

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

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
Showing 1-6 of 6 results.