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 21-30 of 32 results. Next

A319350 Filter sequence which records the number of cyclotomic cosets of 2 mod p for odd primes p, and for any other number assigns a unique number.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 3, 10, 3, 11, 12, 13, 6, 14, 3, 15, 16, 17, 6, 18, 19, 20, 21, 22, 3, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 6, 33, 34, 35, 36, 37, 6, 38, 39, 40, 41, 42, 3, 43, 44, 45, 46, 47, 3, 48, 3, 49, 50, 51, 52, 53, 3, 54, 55, 56, 6, 57, 58, 59, 60, 61, 62, 63, 6, 64, 65, 66, 3, 67, 68, 69, 70, 71, 58, 72, 73, 74, 75, 76, 77, 78, 6, 79, 80, 81, 3, 82, 6
Offset: 1

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A006694((n-1)/2) when n is an odd prime, otherwise -n.
For all i, j:
a(i) = a(j) => A305801(i) = A305801(j),
a(i) = a(j) => A319351(i) = A319351(j).

Examples

			a(3) = a(5) = a(11) = a(13) = a(19) = a(29) = a(37) because 3, 5, 11, 13, 19, 29, 37 are primes p for which A006694((p-1)/2) = 1 (are in A001122).
a(7) = a(17) = a(23) = a(41) = a(47) because 7, 17, 23, 41, 47 are primes p for which A006694((p-1)/2) = 2 (are in A115591).
		

Crossrefs

Cf. A001122 (positions of 3's), A115591 (positions of 6's).
Cf. also A319704, A319705, A319706.

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A319350aux(n) = if((n<=2)||!isprime(n),n,-((n-1)/znorder(Mod(2, n))));
    v319350 = rgs_transform(vector(up_to,n,A319350aux(n)));
    A319350(n) = v319350[n];

A002323 ((2^m - 1) / p) mod p, where p = prime(n) and m = ord(2,p).

Original entry on oeis.org

1, 3, 1, 5, 3, 15, 3, 20, 1, 1, 1, 32, 37, 22, 36, 8, 36, 10, 1, 7, 49, 48, 23, 77, 92, 81, 13, 95, 49, 1, 17, 95, 30, 96, 66, 132, 67, 107, 3, 50, 148, 25, 52, 175, 167, 109, 143, 201, 99, 30, 13, 207, 200, 255, 64, 260, 190, 208, 159, 208, 78, 98, 243, 60
Offset: 2

Views

Author

Keywords

Comments

a(n) = 0 if and only if prime(n) is a Wieferich prime (A001220). - Eric M. Schmidt, Feb 23 2015

Examples

			For p = prime(3) = 5, we find that m = 4 is the smallest positive integer for which 2^m - 1 is divisible by p. So a(3) = ((2^4 - 1) / 5) mod 5 = 3. - _Eric M. Schmidt_, Jun 21 2013
		

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • W. Meißner, Über die Teilbarkeit von 2^p-2 durch das Quadrat der Primzahl p=1093, Sitzungsberichte der Königlich Preußischen Akadamie der Wissenschaften, Berlin, 35 (1913), 663-667.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; Mod[(2^MultiplicativeOrder[2, p] - 1)/p, p], {n, 2, 100}] (* T. D. Noe, Jun 21 2013 *)
  • PARI
    a(n) = my(p=prime(n));(lift(Mod(2,p^2)^znorder(Mod(2,p)))-1)/p \\ Jeppe Stig Nielsen, May 30 2023
  • Sage
    def A002323(n) : p = nth_prime(n); return (2^(Mod(2,p).multiplicative_order()) - 1) // p % p # Eric M. Schmidt, Jun 21 2013
    

Extensions

Proper definition added by and more terms from Eric M. Schmidt, Jun 21 2013

A170820 Let p = n-th prime; a(n) = (p-1)/(order of (p+3)/2 mod p).

Original entry on oeis.org

2, 1, 1, 3, 1, 6, 2, 4, 1, 1, 1, 2, 2, 4, 1, 5, 2, 10, 2, 3, 1, 1, 12, 4, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 5, 2, 2, 4, 3, 42, 1, 1, 1, 1, 2, 8, 1, 1, 2, 4, 1, 1, 7, 2, 4, 6, 2, 2, 4, 30, 2, 1, 1, 1, 2, 1, 3, 2, 2, 2, 1, 25, 4, 11, 1, 10, 2, 3, 1, 1, 8, 10, 33, 1, 2, 3, 1, 6, 2, 4, 1, 2, 1, 2, 2, 1
Offset: 3

Views

Author

N. J. A. Sloane, Dec 24 2009

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory); [seq((ithprime(n)-1)/order((ithprime(n)+3)/2,ithprime(n)),n=3..130)];
  • Mathematica
    a[n_] := Module[{p=Prime[n]}, (p-1)/MultiplicativeOrder[(p+3)/2, p]]; Array[a, 100, 3] (* Amiram Eldar, Dec 03 2018 *)
  • PARI
    a(n) = my(p=prime(n)); (p-1)/znorder(Mod((p+3)/2, p)); \\ Michel Marcus, Dec 03 2018

A226088 a(n) is the number of the distinct quadrilaterals in a regular n-gon, which Q3 type are excluded.

Original entry on oeis.org

0, 1, 1, 3, 4, 8, 10, 15, 19, 26, 31, 39, 46, 56, 64, 75, 85, 98, 109, 123, 136, 152, 166, 183, 199, 218
Offset: 3

Views

Author

Kival Ngaokrajang, May 25 2013

Keywords

Comments

From the drawings as shown in links, it can be separated the distinct quadrilaterals into 3 types:
Q1: Quadrilaterals which have at least one side equal to n-gon sides length.
Q2: Quadrilaterals which have at least one pair parallel sides and all sides are longer than n-gon sides length.
Q3: Quadrilaterals which have no parallel sides and all sides are longer than n-gon side length.
Q1(n) = A004652(n-3); Q2(n) = A001917(n-6), Q2(3) = 0, Q2(4) = 0; Q3(n) = A005232(n-10), Q3(3) = 0, Q3(4) = 0, Q3(5) = 0, Q3(6) = 0, Q3(7) = 0, Q3(8) = 0, Q3(9) = 0.
a(n) = Q1(n) + Q2(n). The total distinct quadrilaterals is Q1 + Q2 + Q3. Also the total distinct quadrilaterals = A005232(n-4), for n>=4. Also a(n) = A005232(n-4) - A005232(n-10), for n>=10.

Examples

			For a pentagon, there are 5 quadrilaterals which are the same size and shape. Therefore a(5) = 1.
		

Crossrefs

Cf. A004652, A001917, A005232, A001399: For n >= 3, a(n-3) is number of distinct triangles in an n-gon.

Formula

Empirical g.f.: -x^4*(x^2-x+1)^2*(x^2+x+1) / ((x-1)^3*(x+1)*(x^2+1)). - Colin Barker, Oct 31 2013

A319351 Filter sequence which records the number of cyclotomic cosets of 2 mod p^k for powers of odd primes p, and for any other number assigns a unique number.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 6, 7, 6, 8, 3, 9, 3, 10, 11, 12, 6, 13, 3, 14, 15, 16, 6, 17, 6, 18, 19, 20, 3, 21, 22, 23, 24, 25, 26, 27, 3, 28, 29, 30, 6, 31, 19, 32, 33, 34, 6, 35, 36, 37, 38, 39, 3, 40, 41, 42, 43, 44, 3, 45, 3, 46, 47, 48, 49, 50, 3, 51, 52, 53, 6, 54, 55, 56, 57, 58, 59, 60, 6, 61, 36, 62, 3, 63, 64, 65, 66, 67, 55, 68, 69, 70, 71, 72, 73, 74, 6, 75, 76, 77, 3, 78, 6
Offset: 1

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to the number of cyclotomic cosets of 2 mod p^k, while all other numbers occur in singular equivalence classes of their own.
Restricted growth sequence transform of function f defined as f(n) = A006694((n-1)/2) when n is an odd prime power > 1, otherwise -n.
For all i, j: a(i) = a(j) => A305976(i) = A305976(j). (See also A305975).

Examples

			a(7) = a(9) = a(17) = a(23) = a(25) = a(41) = ... because n = 7, 9, 17, 23, 25, 41, ... are such powers of odd primes for which A006694((n-1)/2) = 4.
		

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694
    A319351aux(n) = if((n<=2)||!(n%2)||!isprimepower(n),n,-(A006694((n-1)/2)));
    v319351 = rgs_transform(vector(up_to,n,A319351aux(n)));
    A319351(n) = v319351[n];

A367318 Lesser of twin primes p such that p and p+2 are both in A115591.

Original entry on oeis.org

191, 311, 1487, 1871, 2711, 2999, 3167, 3767, 4967, 5519, 7559, 8087, 10271, 11351, 11831, 13679, 15647, 18311, 18911, 21647, 22271, 22367, 23687, 25799, 26711, 27239, 27527, 27791, 29399, 29879, 31727, 31847, 33287, 34367, 35591, 38447, 38567, 40127, 40847, 42071
Offset: 1

Views

Author

Amiram Eldar, Nov 14 2023

Keywords

Comments

Primes p such that p+2 is also a prime and (p-1)/ord(2, p) = (p+1)/ord(2, p+2) = 2, where ord(2,k) is the multiplicative order of 2 modulo k.
Equivalently, lesser of twin primes p such that ord(2, p+2) = ord(2, p) + 1,
Equal consecutive values in A001917 that correspond to twin primes (p, p+2) are either 1 if p is in A319248, or 2 if p is in this sequence.
Terms are congruent to 23 modulo 24. - Jianing Song, Nov 01 2024

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2, 4400]], PrimeQ[# + 2] && MultiplicativeOrder[2, # + 2] == MultiplicativeOrder[2, #] + 1 &]
  • PARI
    is(n) = isprime(n) && isprime(n+2) && znorder(Mod(2, n + 2)) == znorder(Mod(2, n)) + 1;

A170822 Let p = n-th prime; a(n) = (p-1)/(order of A170821(n) mod p).

Original entry on oeis.org

1, 3, 2, 2, 1, 1, 2, 1, 1, 12, 1, 1, 2, 1, 2, 4, 1, 14, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 10, 1, 3, 1, 1, 4, 9, 2, 1, 2, 18, 2, 16, 1, 1, 1, 1, 2, 2, 1, 2, 6, 2, 1, 2, 1, 1, 2, 1, 1, 1, 3, 10, 12, 1, 1, 42, 2, 12, 1, 2, 1, 4, 27, 2, 1, 4, 1, 6, 2, 6, 10, 4, 3, 2, 1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 1, 5
Offset: 3

Views

Author

N. J. A. Sloane, Dec 24 2009

Keywords

Examples

			n=3: p=5, A170821(n)=2, order of 2 mod 5 = 4, (5-1)/4 = 1 = a(3).
		

Crossrefs

Programs

  • PARI
    f(n) = my(p=prime(n), k=0); while(Mod(4*k, p) != 3, k++); k; \\ A170821
    a(n) = my(p=prime(n)); (p-1)/znorder(Mod(f(n), p)); \\ Michel Marcus, Dec 04 2018

A182109 Records in A094593.

Original entry on oeis.org

1, 2, 4, 5, 6, 12, 16, 39, 84, 156, 350, 358, 589, 984, 2030, 2682, 3312, 4364, 19152, 61320, 61632, 142066, 353998, 702794, 1063044, 2056526, 2866334, 5479152, 8751462, 43544486
Offset: 1

Views

Author

Vassilis Papadimitriou, Apr 12 2012

Keywords

Comments

It is for A094593 what A152598 is for A001917.

Examples

			First few terms of A094593 are 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 5, 1, 2, 1, 2, 6, 3, 2, 6, 1, 2, 1, 2, 1, 3, 2, 4, 1, 1, 2, 1, 1, 1, 3, 2, 1, 2, 1, 2, 4, 2, 12, so a(1) to a(6) are 1, 2, 4, 5, 6, 12.
		

Crossrefs

Cf. A094593.

Extensions

a(26)-a(30) from Chai Wah Wu, Jan 15 2020

A174437 Successive maximal values of A174435.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 16, 31, 36, 48, 105, 129, 315, 316, 387, 538, 1285, 1542, 2048, 3855, 4599, 4864, 7760, 13797, 18166, 24417, 60787, 104694
Offset: 1

Views

Author

Vassilis Papadimitriou, Mar 19 2010

Keywords

Examples

			First terms of A174435 are: 1,1,1,1,1,2,1,1,1,1,1,2,1,1,3,1,1,1,2,2,3,1,1,1,1,3,1,2,1,1,1,2,1,1,2,1,1,3,2,4,2,1,1,1,1,1,1,1,4,2,2,1,1,1,1,1,1,1,1,2,3,2,1,4,3,1,2,1,1,9, so a(1)=1, a(2)=2, a(3)=3, a(4)=4, a(5)=9.
		

Crossrefs

It is for A174435 what A152598 is for A001917.

A250203 Numbers n such that the Phi_n(2) is the product of exactly two primes and is divisible by 2n+1.

Original entry on oeis.org

11, 20, 23, 35, 39, 48, 83, 96, 131, 231, 303, 375, 384, 519, 771, 848, 1400, 1983, 2280, 2640, 2715, 3359, 6144, 7736, 7911, 11079, 13224, 16664, 24263, 36168, 130439, 406583
Offset: 1

Views

Author

Eric Chen, Mar 13 2015

Keywords

Comments

Here Phi_n is the n-th cyclotomic polynomial.
Is this sequence infinite?
Phi_n(2)/(2n+1) is only a probable prime for n > 16664.
a(33) > 2000000.
Subsequence of A005097 (2 * a(n) + 1 are all primes)
Subsequence of A081858.
2 * a(n) + 1 are in A115591.
Primes in this sequence are listed in A239638.
A085021(a(n)) = 2.
All a(n) are congruent to 0 or 3 (mod 4). (A014601)
All a(n) are congruent to 0 or 2 (mod 3). (A007494)
Except the term 20, all even numbers in this sequence are divisible by 8.

Examples

			Phi_11(2) = 23 * 89 and 23 = 2 * 11 + 1, so 11 is in this sequence.
Phi_35(2) = 71 * 122921 and 71 = 2 * 35 + 1, so 35 is in this sequence.
Phi_48(2) = 97 * 673 and 97 = 2 * 48 + 1, so 48 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10000], PrimeQ[2*# + 1] && PowerMod[2, #, 2*# + 1] == 1 &&
    PrimeQ[Cyclotomic[#, 2]/(2*#+1)] &]
  • PARI
    isok(n) = if (((x=polcyclo(n, 2)) % (2*n+1) == 0) && (omega(x) == 2), print1(n, ", ")); \\ Michel Marcus, Mar 13 2015
Previous Showing 21-30 of 32 results. Next