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 41-50 of 85 results. Next

A124516 a(n) = least k such that 2^i*k-1 is prime for 1<=i<=n.

Original entry on oeis.org

2, 2, 3, 3, 45, 45, 561330, 9549960, 42932385, 13044904290, 277344139215, 277344139215, 2045466215756535
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    k = 1; Do[If[n < 5, inc = 1, inc = 15];If[Mod[k, inc] > 0, k = k + inc - Mod[k, inc]];While[Nand @@ PrimeQ[Table[2^j, {j, n}]*k - 1], k += inc]; Print[k], {n, 1, 10}] (* Ray Chandler *)

Extensions

Definition corrected and a(10) calculated by Farideh Firoozbakht, Nov 24 2006
a(11)-a(13) from Giovanni Resta, Apr 22 2019

A082749 Difference between the sum of next prime(n) natural numbers and the sum of next n primes.

Original entry on oeis.org

1, 4, 9, 10, 54, 71, 191, 236, 446, 1025, 1310, 2259, 3245, 3820, 5048, 7321, 10060, 11473, 15328, 18358, 20381, 25672, 30222, 36561, 46367, 53031, 58108, 65444, 70971, 78391, 104184, 116542, 133095, 142728, 169931, 181324, 203429, 226622
Offset: 1

Views

Author

Amarnath Murthy, Apr 17 2003

Keywords

Comments

Group the natural numbers with prime(n) elements in each group. (1,2),(3,4,5),(6,7,8,9,10),(11,12,13,14,15,16,17),... The sum corresponding the groups is 3,12,40,98,... Group the prime numbers such that the n-th group contains n primes. (2),(3,5),(7,11,13),(17,19,23,29),... The sum corresponding the groups is 2,8,31,88,... The required difference is 1,4,9,10,...
The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004

Programs

  • Mathematica
    Module[{nn=80,trms=40,c,nat,pr},c=(nn(nn+1))/2;nat=Total/@TakeList[Range[c],Prime[Range[trms]]];pr=Total/@TakeList[Prime[Range[c]], Range[trms]]; Differences/@ Thread[{pr,nat}]]//Flatten (* Harvey P. Dale, Apr 13 2025 *)

Formula

a(n) = ((A061802(n-1) + 1)*A000040(n))/2 - A007468(n). - Gionata Neri, May 17 2015

Extensions

More terms from Ray Chandler, May 13 2003

A124514 Numbers k for which 2*k-1, 4*k-1, 8*k-1, 16*k-1, 32*k-1, 64*k-1 and 128*k-1 are primes.

Original entry on oeis.org

561330, 1082115, 1164735, 5128905, 5154945, 6157350, 7015155, 7072770, 9549960, 11551830, 12088065, 14421825, 18544365, 19099920, 21194760, 24580050, 25392720, 26277285, 31400085, 34359030, 42932385, 44087025, 47915595
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[15*Range[3200000], And @@ PrimeQ /@ ({2, 4, 8, 16, 32, 64, 128}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)
    apQ[n_]:=AllTrue[NestList[2#&,2n,6]-1,PrimeQ]; Select[15*Range[ 32*10^5], apQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 08 2019 *)

A125113 Numbers n such that 2n-1, 4n-1, 8n-1, 16n-1, 32n-1 and 64n-1 are primes.

Original entry on oeis.org

45, 31710, 63570, 202635, 405405, 534600, 561330, 589305, 666945, 799350, 903045, 979125, 1082115, 1122660, 1164735, 1303035, 1424475, 1620645, 1669995, 1892100, 1981020, 2044440, 2164230, 2222415, 2329470, 2332125, 2447445, 2448855
Offset: 1

Views

Author

Artur Jasinski, Nov 22 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[15*Range[200000], And @@ PrimeQ /@ ({2, 4, 8, 16, 32, 64}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)
    Select[15*Range[164000],AllTrue[# 2^Range[6]-1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 20 2020 *)

Extensions

Extended by Ray Chandler, Nov 22 2006

A219695 For odd numbers 2n - 1, half the difference between the largest divisor not exceeding the square root, and the least divisor not less than the square root.

Original entry on oeis.org

0, 1, 2, 3, 0, 5, 6, 1, 8, 9, 2, 11, 0, 3, 14, 15, 4, 1, 18, 5, 20, 21, 2, 23, 0, 7, 26, 3, 8, 29, 30, 1, 4, 33, 10, 35, 36, 5, 2, 39, 0, 41, 6, 13, 44, 3, 14, 7, 48, 1, 50, 51, 4, 53, 54, 17, 56, 9, 2, 5, 0, 19, 10, 63, 20, 65, 6, 3, 68, 69, 22, 1, 12, 7, 74, 75, 4, 13, 78, 25, 8, 81, 2, 83, 0, 5, 86, 9, 28, 89
Offset: 1

Views

Author

M. F. Hasler, Nov 25 2012

Keywords

Comments

We consider 2n-1 which has only odd divisors, so any difference among them is always even.
a(n) = 0 if and only if 2n - 1 is a square.
From Charles Kusniec, Oct 31 2024: (Start)
a(n) = 1 iff 2n is a square.
a(n) = 2 iff 2n-1 = (2k-1)^2 - 4.
a(n) = 3 iff 2n-1 = (2k)^2 - 9.
Since 2n-1 is odd, 2n-1 = d*D can be written 2n-1 = (x-y)*(x+y) = x^2 - y^2 with integers x and y, from which a(n) is the smallest possible y, which also means smallest possible x and that being x = A377499(n).
Record values occur when 2n-1 is an odd prime (n in A006254), and then a(n) = n-1 (and A377499(n) = n). (End)
From Rémi Guillaume, Mar 12 2025: (Start)
a(n) is half the difference between the "median" divisors of 2n-1.
a(n) and A377499(n) have opposite parities.
a(n) and n have opposite parities. (End)

Examples

			For n = 2, consider divisors of 2n - 1 = 3 which are {1, 3}. The least one greater than or equal to sqrt(3) is 3, the largest one less than or equal to sqrt(3) is 1; whence a(2) = (3 - 1)/2 = 1.
For n = 14, consider divisors of 2n - 1 = 27 which are {1, 3, 9, 27}. The least one greater than or equal to sqrt(27) is 9, the largest one less than or equal to sqrt(27) is 3; whence a(14) = (9 - 3)/2 = 3.
For n = 1, 5, 13, 25, ..., the number 2n - 1 equals the square 1, 9, 25, 49, ...; so the two beforementioned "median" divisors coincide with the square root, and a(n) = 0/2 = 0.
		

Crossrefs

Cf. A006254 (indices of record highs).

Programs

  • Mathematica
    Table[(Divisors[n][[(Length[Divisors[n]] - Boole[IntegerQ[Sqrt[n]]])/2 + 1]] - Divisors[n][[(Length[Divisors[n]] + Boole[IntegerQ[Sqrt[n]]])/2]])/2, {n, 1, 199, 2}] (* Alonso del Arte, Nov 25 2012, corrected March 21 2024, with help from Giorgos Kalogeropoulos *)
    A219695[n_] := (d = Divisors[2n - 1]; l = Floor[Length@d/2 + 1]; (d[[l]] - d[[-l]])/2); Array[A219695, 100] (* Giorgos Kalogeropoulos, Mar 15 2024 *)
  • PARI
    A056737(n)={n=divisors(n); n[(2+#n)\2]-n[(1+#n)\2]}
    A219695(n)=A056737(2*n-1)/2  \\ M. F. Hasler, Nov 25 2012

Formula

a(n) = (A056737(2n-1))/2 = (A033677(2n-1) - A033676(2n-1))/2.
a(n) = sqrt(A377499(n)^2 - (2n-1)). - Charles Kusniec, Oct 31 2024

A244984 Permutation of natural numbers: a(n) = A243283(A122111((2*n)-1)).

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 14, 6, 23, 37, 10, 58, 8, 7, 90, 143, 15, 13, 225, 24, 355, 563, 12, 894, 17, 38, 1426, 20, 60, 2277, 3643, 19, 31, 5839, 96, 9398, 15155, 16, 27, 24518, 11, 39758, 50, 153, 64607, 42, 242, 80, 105250, 30, 171874, 281237, 26
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A243283(A122111((2*n)-1)).
a(n) = A243283(A105560((2*n)-1) * A243505(n)).
For all n >= 1, a(A006254(n)) = A244986(n+1).

A091304 a(n) = Omega(2n-1) (number of prime factors of the n-th odd number, counted with multiplicity).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 2, 2, 1, 1, 3, 2, 1, 2, 1, 1, 3, 2, 1, 4, 1, 2, 2, 1, 2, 2, 2, 1, 3, 1, 1, 3, 1, 1, 2, 1, 2, 3, 2, 2, 2, 3, 1, 2, 1, 2, 4, 1, 1, 2, 2, 2, 3, 1, 1, 3, 2, 1, 2, 2, 1, 3, 1, 2, 3, 1, 3, 2, 1, 1, 2, 2, 2, 4, 1, 1, 3, 1, 1, 2, 2, 2, 3, 2
Offset: 1

Views

Author

Andrew S. Plewe, Feb 20 2004

Keywords

Comments

Omega(n) of the odd integers follows a pattern similar to A001222, with 4 maxima instead of 2 - i.e. between 2^n and (2^(n+1) - 1) there are two numbers with exactly n factors (2^n and 2^(n-1) * 3) while the odd integers have 4 maxima (3^n, 3^(n-1) * 5, 3^(n-1) * 7, 5^2*3^(n-2)) between 3^n and 3^(n+1) - 1.

Examples

			Omega(1) = 0, Omega(9) = 2 (3 * 3 = 9), Omega (243) = 5 (3 * 3 * 3 * 3 * 3 = 243), Omega(51) = 2 (3 * 17 = 51).
For n = 92, A001222(2*92 - 1) = A001222(183) = 2 as 183 = 3*61, thus a(92) = 2. - _Antti Karttunen_, May 31 2017
		

Crossrefs

One more than A285716 (after the initial term).
Cf. A006254 (positions of ones).

Programs

  • Mathematica
    a[n_] := PrimeOmega[2*n - 1]; Array[a, 100] (* Amiram Eldar, Jul 23 2023 *)
  • PARI
    a(n) = bigomega(2*n-1) \\ Michel Marcus, Jul 26 2013, edited to reflect the changed starting offset by Antti Karttunen, May 31 2017

Formula

a(n) = Omega(2n-1). [Odd bisection of A001222.]
From Antti Karttunen, May 31 2017: (Start)
For n >= 1, a(n) = A000120(A244153(n)).
For n >= 2, a(n) = 1+A285716(n).
(End)

Extensions

Starting offset changed to 1 and the definition modified respectively. Also values of the initial term and of term a(92) (= 2, previously a(91) = 1) corrected by Antti Karttunen, May 31 2017

A124017 Numbers n for which 2n-1, 4n-1, 8n-1, 16n-1 and 32n-1 are primes.

Original entry on oeis.org

45, 90, 26820, 26925, 30705, 31710, 33375, 63420, 63570, 71805, 83865, 93075, 103185, 127140, 134025, 148050, 170460, 202635, 211035, 223305, 269505, 297225, 303660, 329175, 335625, 362505, 387975, 405270, 405405, 406425, 409755, 463335
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[15*Range[40000], And @@ PrimeQ /@ ({2, 4, 8, 16, 32}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)
    Select[15*Range[31000],AllTrue[#*2^Range[5]-1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 05 2019 *)

A124492 a(n) = least k such that 2*i*k - 1 is prime for 1 <= i <= n.

Original entry on oeis.org

2, 2, 2, 3, 3, 77385, 1447110, 1447110, 203937090, 107290072890, 4724240531010, 123618251967210, 1272603355923900, 9089306184994125090
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = If[n < 6, 1, 5], s}, s = k; While[! AllTrue[k  2 Range[n] - 1, PrimeQ], k += s]; k]; Array[a, 8] (* Giovanni Resta, Apr 01 2017 *)

Extensions

Corrected and extended by Don Reble, Nov 05 2006
a(12)-a(14) from Giovanni Resta, Apr 01 2017

A124493 Numbers k for which 2*k-1, 4*k-1 and 8*k-1 are primes.

Original entry on oeis.org

3, 6, 21, 45, 90, 180, 255, 360, 510, 516, 615, 705, 726, 741, 756, 906, 945, 951, 966, 1230, 1350, 1410, 1725, 1746, 1770, 1911, 1956, 2541, 2700, 2721, 2925, 3051, 3066, 3225, 3540, 3576, 3675, 3951, 4485, 4611, 5295, 5346, 5355, 5586, 5736, 5775, 5901
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[3*Range[2000], And @@ PrimeQ /@ ({2, 4, 8}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)
Previous Showing 41-50 of 85 results. Next