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 51-60 of 85 results. Next

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

Original entry on oeis.org

3, 45, 90, 180, 255, 615, 705, 1350, 1770, 3225, 5295, 5775, 5955, 6060, 8580, 9855, 9945, 11175, 13095, 13740, 15195, 21825, 26820, 26925, 27615, 28920, 30075, 30705, 31710, 33375, 35700, 37350, 37665, 41250, 43770, 49185, 50700, 52185, 53640
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Subsequence of A124493. Supersequence of A124017.

Programs

  • Mathematica
    Select[3*Range[20000], And @@ PrimeQ /@ ({2, 4, 8, 16}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)
    Select[Range[3,55000,3],AllTrue[2^Range[4] #-1,PrimeQ]&] (* or, faster  *) Join[{3},Select[Range[ 15,55000,15],AllTrue[ 2^Range[4] #-1,PrimeQ]&]] (* Harvey P. Dale, Feb 02 2025 *)

Extensions

Extended by Ray Chandler, Nov 22 2006

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

Original entry on oeis.org

9549960, 26277285, 42932385, 85864770, 99239790, 113183070, 152596290, 172159515, 198479580, 237059175, 287482065, 305192580, 342533490, 382203030, 542591115, 563002110, 597825570, 686106720, 742227135, 786875025, 1135145760
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[15*Range[76000000], And @@ PrimeQ /@ ({2, 4, 8, 16, 32, 64, 128, 256}*# - 1) &] (* Ray Chandler, Nov 22 2006 *)

Extensions

Extended by Ray Chandler, Nov 22 2006

A244983 Permutation of natural numbers: a(1) = 1, a(n) = (1 + A122111(A070003(n-1))) / 2.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 14, 13, 6, 11, 41, 23, 18, 7, 17, 38, 25, 68, 32, 28, 122, 63, 9, 20, 113, 53, 39, 365, 95, 50, 33, 74, 203, 61, 188, 88, 10, 26, 1094, 158, 83, 46, 608, 313, 3281, 338, 123, 149, 59, 43, 221, 116, 284, 72, 263, 138, 1013, 12, 9842, 29, 1823, 248, 98, 563, 172, 60
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2014

Keywords

Crossrefs

Inverse: A244984.
Related or similar permutations: A122111, A244981-A244982, A243505-A243506, A243065-A243066.

Programs

Formula

a(1) = 1, a(n) = (1 + A122111(A070003(n-1))) / 2.
For all n >= 1, a(A244986(n+1)) = A006254(n).

A245685 Sigma(2p)/2, for odd primes p.

Original entry on oeis.org

6, 9, 12, 18, 21, 27, 30, 36, 45, 48, 57, 63, 66, 72, 81, 90, 93, 102, 108, 111, 120, 126, 135, 147, 153, 156, 162, 165, 171, 192, 198, 207, 210, 225, 228, 237, 246, 252, 261, 270, 273, 288, 291, 297, 300, 318, 336, 342, 345, 351, 360, 363, 378, 387, 396, 405
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jul 29 2014

Keywords

Comments

The symmetric representation of sigma(2*p), p > 3 prime, consists of two sections each with three contiguous legs of width one (for a proof see the link).
The two ratios of successive legs in the symmetric representation of sigma(2*p) are integers 3 and 2, respectively, for all primes p > 3 satisfying p = -1(mod 6); see also A003627. If one ratio is an integer then so is the other.
The sequence 2*p for primes p > 3 is a subsequence of A239929, numbers n whose symmetric representation of sigma(n) has two parts.
Since sigma(2*p) = 3*(p+1), each element of the sequence is a multiple of 3; furthermore, a(n)/3 = A006254(n) = A111333(n+1).

Examples

			a(4) = T(22, 1) - T(22, 4) = 22 - 4 = 18 = sigma(22)/2
The last image in the Example section of A237593 includes the first four symmetric representations for this sequence, i.e., when 2*p = 10, 14, 22 & 26; see also the link for an image of the first 10 symmetric representations.
		

Crossrefs

Programs

  • Magma
    [3*(NthPrime(n+1)+1)/2: n in [1..60]]; // Vincenzo Librandi, Sep 19 2014
    
  • Mathematica
    a[n_]:=3(Prime[n+1]+1)/2
    Map[a,Range[55]] (* data *)
    DivisorSigma[1,2#]/2&/@Prime[Range[2,60]] (* Harvey P. Dale, Jan 07 2023 *)
  • PARI
    vector(100,n,3*(prime(n+1)+1)/2) \\ Derek Orr, Sep 19 2014
    
  • PARI
    vector(60, n, sigma(2*prime(n+1))/2) \\ Michel Marcus, Nov 25 2014

Formula

a(n) = T(2*prime(n+1), 1) - T(2*prime(n+1), 4) = 3*(prime(n+1)+1)/2 = sigma(2*prime(n+1))/2 where T(n,k) is defined in A235791.
a(n)=A247159(n+1)/2. - Omar E. Pol, Nov 22 2014

A285716 a(n) = A080791(A245611(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Crossrefs

One less than A091304 after the initial term.
Cf. A006254 (gives the positions of zeros after initial a(1)=0.)

Programs

  • Mathematica
    a[n_] := PrimeOmega[2*n - 1] - 1; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jul 23 2023 *)
  • Scheme
    ;; First implementation uses memoization-macro definec:
    (definec (A285716 n) (if (<= n 2) 0 (+ (if (= 2 (modulo n 3)) 1 0) (A285716 (A285712 n)))))
    (define (A285716 n) (A080791 (A245611 n)))

Formula

a(1) = 0, a(2) = 1, for n > 2, a(n) = a(A285712(n)) + [n == 2 mod 3]. (Where [] is Iverson bracket, giving here 1 only if n is of the form 3k+2, and 0 otherwise.)
a(n) = A080791(A245611(n)).
For all n >= 2, a(n) = A091304(n)-1 = A000120(A244153(n))-1. - Antti Karttunen, May 31 2017

A130291 Number of quadratic residues (including 0) modulo the n-th prime.

Original entry on oeis.org

2, 2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 21, 22, 24, 27, 30, 31, 34, 36, 37, 40, 42, 45, 49, 51, 52, 54, 55, 57, 64, 66, 69, 70, 75, 76, 79, 82, 84, 87, 90, 91, 96, 97, 99, 100, 106, 112, 114, 115, 117, 120, 121, 126, 129, 132, 135, 136, 139, 141, 142, 147, 154, 156, 157
Offset: 1

Views

Author

M. F. Hasler, May 21 2007

Keywords

Comments

The number of squares (quadratic residues including 0) modulo a prime p (sequence A096008 with every "1" prefixed by a "0") equals 1+floor(p/2), or ceiling(p/2) = (p+1)/2 if p is odd. (In fields of characteristic 2, all elements are squares.) See A130290(n)=A130291(n)-1 for number of nonzero residues. For all n>0, A130291(n+1) = A111333(n+1) = A006254(n) = A005097(n)-1 = A102781(n+1)-1 = A102781(n+1)-1 = A130290(n+1)-1.

Examples

			a(1)=2 since both elements of Z/2Z are squares.
a(3)=0 since 0=0^2, 1=1^2=(-1)^2 and 4=2^2=(-2)^2 are squares in Z/5Z.
a(1000000) = 7742932 = (p[1000000]+1)/2.
		

Crossrefs

Essentially the same as A006254.
Cf. A005097 (Odd primes - 1)/2, A102781 (Integer part of n#/(n-2)#/2#), A102781 (Number of even numbers less than the n-th prime), A063987 (quadratic residues modulo the n-th prime), A006254 (Numbers n such that 2n-1 is prime), A111333 (Number of odd numbers <= n-th prime), A000040 (prime numbers), A130290 (number of nonzero residues modulo primes).

Programs

Formula

a(n) = floor( A000040(n)/2 )+1

A139757 a(n) = (n+1)*(2n+1)^2.

Original entry on oeis.org

1, 18, 75, 196, 405, 726, 1183, 1800, 2601, 3610, 4851, 6348, 8125, 10206, 12615, 15376, 18513, 22050, 26011, 30420, 35301, 40678, 46575, 53016, 60025, 67626, 75843, 84700, 94221, 104430, 115351, 127008, 139425, 152626, 166635, 181476
Offset: 0

Views

Author

Odimar Fabeny, May 19 2008

Keywords

Comments

Also the detour index of the (n+1)-antiprism graph and (n+1)-cocktail party graphs for n>=2. - Eric W. Weisstein, Jul 15 2011 and Dec 20 2017

Crossrefs

Programs

Formula

a(n) = (2n+1) * A000217(2n+1).
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4); G.f.: (1+14*x+9*x^2)/(x-1)^4. - R. J. Mathar, Sep 19 2010
a(n) = Sum_{i=1..2n-1} (n^2 + n*i - i). - Wesley Ivan Hurt, Sep 29 2014
From Amiram Eldar, Jun 28 2020: (Start)
Sum_{n>=0} 1/a(n) = Pi^2/4 - log(4).
Sum_{n>=0} (-1)^n/a(n) = 2*G + log(2) - Pi/2, where G is the Catalan constant (A006752). (End)

Extensions

Missing a(0) inserted by R. J. Mathar, Sep 19 2010

A066886 Sum of the elements in any transversal of a prime(n) X prime(n) array containing the numbers from 1 to prime(n)^2 in standard order.

Original entry on oeis.org

5, 15, 65, 175, 671, 1105, 2465, 3439, 6095, 12209, 14911, 25345, 34481, 39775, 51935, 74465, 102719, 113521, 150415, 178991, 194545, 246559, 285935, 352529, 456385, 515201, 546415, 612575, 647569, 721505, 1024255, 1124111, 1285745
Offset: 1

Views

Author

Enoch Haga, Jan 22 2002

Keywords

Comments

a(n) is the sum of the primes in a prime(n) X prime(n) example of Haga's conjecture (see link below).

Crossrefs

Programs

  • Maple
    map(t -> t*(t^2+1)/2, [seq(ithprime(i),i=1..100)]); # Robert Israel, Apr 04 2018
  • Mathematica
    a[n_] := Prime[n] (Prime[n]^2 + 1)/2; Table[a[n], {n, 50}]
  • PARI
    apply(x->(x*(x^2+1)/2), primes(100)) \\ Michel Marcus, Apr 04 2018

Formula

a(n) = prime(n)*(prime(n)^2+1)/2, where prime(n) is the n-th prime.
a(n) = A006003(prime(n)). - Michel Marcus, Apr 04 2018
a(n) = A006254(n-1)^4 - A005097(n-1)^4, for n>1. - Dimitris Valianatos, Apr 10 2018

Extensions

Edited by Dean Hickerson, Jun 08 2002

A163427 Primes p such that (p+1)^3/8+(p-1)/2 is also prime.

Original entry on oeis.org

5, 7, 13, 19, 29, 31, 41, 53, 71, 101, 103, 109, 173, 191, 199, 223, 229, 233, 239, 257, 269, 277, 331, 383, 397, 431, 491, 569, 571, 599, 619, 631, 719, 733, 751, 757, 761, 823, 857, 859, 863, 887, 907, 937, 967, 971, 977, 1009, 1019, 1063, 1069, 1123, 1163
Offset: 1

Views

Author

Keywords

Comments

Primes A000040(k) such that (A006254(k-1))^3+ A005097(k-1) is also prime.

Examples

			For p=5, (5+1)^3/8+(5-1)/2=27+2=29, prime, which adds p=5 to the sequence.
For p=7, (7+1)^3/8+(7-1)/2=67, prime, which adds p=7 to the sequence.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(3, 1200) | IsPrime((p+1)^3 div 8+(p-1) div 2)]; // Vincenzo Librandi, Apr 09 2013
  • Mathematica
    f[n_]:=((p+1)/2)^3+((p-1)/2); lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst, p]],{n,6!}];lst
    Select[Prime[Range[100]], PrimeQ[(# + 1)^3 / 8 + (# - 1) / 2]&] (* Vincenzo Librandi, Apr 09 2013 *)

Formula

(a(n)+1)^3/8+(a(n)-1)/2 = A163426(n).

Extensions

Edited by R. J. Mathar, Aug 24 2009

A201912 Irregular triangle of 2^k mod prime(n).

Original entry on oeis.org

0, 1, 2, 1, 2, 4, 3, 1, 2, 4, 1, 2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12, 1, 2, 4, 8, 16, 3, 6, 12, 24
Offset: 1

Views

Author

T. D. Noe, Dec 17 2011

Keywords

Comments

The row lengths are in A014664. For n > 1, the first term of each row is 1 and the last term is 2*prime(n)-1, which is A006254. Many sequences are in this one.

Examples

			The first 11 rows are:
2:  0;
3:  1, 2;
5:  1, 2, 4, 3;
7:  1, 2, 4;
11: 1, 2, 4, 8,  5, 10,  9,  7,  3,  6;
13: 1, 2, 4, 8,  3,  6, 12, 11,  9,  5, 10,  7;
17: 1, 2, 4, 8, 16, 15, 13,  9;
19: 1, 2, 4, 8, 16, 13,  7, 14,  9, 18, 17, 15, 11,  3,  6, 12,  5, 10;
23: 1, 2, 4, 8, 16,  9, 18, 13,  3,  6, 12;
29: 1, 2, 4, 8, 16,  3,  6, 12, 24, 19,  9, 18,  7, 14, 28, 27, 25, 21, 13, 26, 23, 17, 5, 10, 20, 11, 22, 15;
31: 1, 2, 4, 8, 16;
		

Crossrefs

Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), A269266 (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67), A036135 (p=83), A036138 (p=101), A036140 (p=107), A036144 (p=131), A036146 (p=139), A036147 (p=149), A036150 (p=163), A036152 (p=173), A036153 (p=179), A036154 (p=181), A036157 (p=197), A036159 (p=211), A036161 (p=227).

Programs

  • GAP
    P:=Filtered([1..350],IsPrime);;
    R:=List([1..Length(P)],n->OrderMod(2,P[n]));;
    Flat(Concatenation([0],List([2..10],n->List([0..R[n]-1],k->PowerMod(2,k,P[n]))))); # Muniru A Asiru, Feb 01 2019
  • Mathematica
    nn = 10; p = 2; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]
Previous Showing 51-60 of 85 results. Next