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

A141350 Overpseudoprimes to base 3.

Original entry on oeis.org

121, 703, 3281, 8401, 12403, 31621, 44287, 47197, 55969, 74593, 79003, 88573, 97567, 105163, 112141, 211411, 221761, 226801, 228073, 293401, 313447, 320167, 328021, 340033, 359341, 432821, 443713, 453259, 478297, 497503, 504913, 679057, 709873, 801139, 867043, 894781, 973241, 1042417
Offset: 1

Views

Author

Vladimir Shevelev, Jun 27 2008, corrected Sep 07 2008

Keywords

Comments

If h_3(n) is the multiplicative order of 3 modulo n, r_3(n) is the number of cyclotomic cosets of 3 modulo n then, by the definition, n is an overpseudoprime to base 3 if h_3(n)*r_3(n)+1=n. These numbers are in A020229.
In particular, if n is squarefree such that its prime factorization is n=p_1*...*p_k, then n is overpseudoprime of base 3 iff h_3(p_1)=...=h_3(p_k).

Crossrefs

Programs

  • Mathematica
    ops3Q[n_] := CompositeQ[n] && GCD[n, 3] == 1 && MultiplicativeOrder[3, n]*(DivisorSum[n, EulerPhi[#]/MultiplicativeOrder[3, #] &] - 1) + 1 == n; Select[Range[10^6], ops3Q] (* Amiram Eldar, Jun 24 2019 *)
  • PARI
    isok(n) = (n!=1) && !isprime(n) && (gcd(n,3)==1) && (znorder(Mod(3,n)) * (sumdiv(n, d, eulerphi(d)/znorder(Mod(3, d))) - 1) + 1 == n); \\ Michel Marcus, Oct 25 2018

Extensions

a(10)-a(38) from Gilberto Garcia-Pulgarin added by Vladimir Shevelev, Feb 06 2012

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];

A064286 Number of cyclotomic cosets C of 2 mod 2n+1 such that -C = C.

Original entry on oeis.org

1, 1, 0, 2, 1, 1, 2, 2, 1, 1, 0, 2, 3, 1, 0, 4, 1, 1, 2, 2, 3, 3, 0, 0, 3, 1, 2, 4, 1, 1, 2, 6, 1, 1, 0, 0, 3, 1, 0, 4, 1, 3, 2, 0, 1, 1, 2, 2, 7, 1, 0, 2, 1, 3, 2, 4, 1, 3, 2, 2, 3, 3, 0, 10, 1, 1, 4, 2, 1, 1, 2, 6, 1, 1, 0, 4, 1, 3, 2, 0, 1, 5, 0, 2, 11, 1, 2, 4, 1, 1, 2, 6, 3, 3, 0, 2, 7, 1, 0, 4, 1, 11, 2, 4
Offset: 1

Views

Author

N. J. A. Sloane, Sep 25 2001

Keywords

Examples

			Mod 15 there are 4 cosets: {1, 2, 4, 8}, {3, 6, 12, 9}, {5, 10}, {7, 14, 13, 11}. Only the cosets {3, 6, 12, 9} and {5, 10} have the desired property. So a(7) = 2.
		

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1977, pp. 104-105.

Crossrefs

Formula

A006694(n) = a(n) + 2*A064287(n).

Extensions

Extended by Ray Chandler, Apr 25 2008

A139767 Let e = 2n+1; consider the cyclotomic cosets C_i of 2 mod e; a(n) = maximal value of minimal number of copies of C_1 needed to add together to get any coset C_i.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 3, 2, 1, 3, 2, 2, 2, 1, 4, 3, 3, 1, 2, 2, 2, 4, 2, 3, 3, 1, 2, 3, 1, 1, 5, 3, 1, 3, 2, 3, 4, 3, 2, 2, 1, 4, 2, 3, 3, 5, 2, 2, 3, 1, 2, 4, 1, 2, 2, 2, 3, 3, 3, 2, 3, 2, 6, 4, 1, 3, 4, 2, 1, 3, 2, 3, 3, 1, 3, 4, 5, 2, 2, 3, 1, 4, 2, 2, 3, 1, 3, 3, 1, 1, 2, 3, 2, 6, 2, 2, 4, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Jun 15 2008

Keywords

Comments

C_i = {i, 2i, 4i, ... } reduced mod e.

Examples

			Let n=7, e=15: the cyclotomic cosets of 2 mod 15 are
C_0 := {0}
C_1 := {1 2 4 8}
C_3 := {3 6 12 9}
C_5 := {5 10}
C_7 := {-1 -2 -4 -8} == {14 13 11 7}
and to get an element of C_7 we must add three elements of C_1;
this is the worst case, so a(7) = 3.
		

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, North-Holland/Elsevier, 1977; see p. 104 for definition of cyclotomic coset.

Crossrefs

Cf. A006694.
Records occur when e is of the form 2^j - 1. Sequence is 1 iff e is in A001122. A140364 lists e such that the sequence is 2.

A141216 a(n) = A137576((N-1)/2) - N, where N = A001567(n).

Original entry on oeis.org

30, 320, 224, 240, 72, 360, 728, 0, 672, 216, 1320, 0, 0, 16, 5060, 60, 126, 10560, 216, 0, 3360, 2574, 150, 5040, 2808, 3600, 3600, 232, 400, 420, 22, 2700, 2784, 224, 96, 70, 1640, 240, 9200, 3600, 2760, 58344, 616, 504, 102, 5600, 8064, 264, 11880, 1440, 7488, 252
Offset: 1

Views

Author

Vladimir Shevelev, Jun 14 2008, Jul 13 2008

Keywords

Comments

The zero terms are of a special interest. Indeed, since for any odd prime p, A137576((p-1)/2)=p, then it is natural to call "overpseudoprimes" those Poulet pseudoprimes A001567(n) for which a(n)=0.
Theorem. A squarefree composite number m = p_1*p_2*...*p_k is an overpseudoprime if and only if A002326((p_1-1)/2) = A002326((p_2-1)/2) = ... = A002326((p_k-1)/2). Moreover, every overpseudoprime is in A001262.
Note that in A001262 there exist terms which are not squarefree. The first is A001262(52) = 1194649 = 1093^2.
It can be shown that if an overpseudoprime is not a multiple of the square of a Wieferich prime (see A001220) then it is squarefree. Also all squares of Wieferich primes are overpseudoprimes.

Crossrefs

Programs

  • Mathematica
    fppQ[n_]:=PowerMod[2,n,n]==2;f[n_] := (t = MultiplicativeOrder[2, 2n+1])*DivisorSum[2n+1, EulerPhi[#] / MultiplicativeOrder[2, #]&]-t+1; s={}; Do[If[fppQ[n] && CompositeQ[n],AppendTo[s,f[(n-1)/2 ]-n]],{n,1,10000}]; s (* Amiram Eldar, Dec 09 2018 after Jean-François Alcover at A137576 *)
  • PARI
    f(n) = my(t); sumdiv(2*n+1, d, eulerphi(d)/(t=znorder(Mod(2, d))))*t-t+1; \\ A137576
    isfpp(n) = {Mod(2, n)^n==2 & !isprime(n) & n>1}; \\ A001567
    lista(nn) = {for (n=1, nn, if (isfpp(n), print1(f((n-1)/2) - n, ", ");););} \\ Michel Marcus, Dec 09 2018

Extensions

More terms via b137576.txt from R. J. Mathar, Jun 12 2010
More terms from Michel Marcus, Dec 09 2018

A160322 a(n) = min(A160198(n), A160267(n)).

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Vladimir Shevelev, May 08 2009, May 11 2009

Keywords

Comments

Let f be defined as in A159885. Then a(n) is the least k such that either f^k(2n+1))<2n+1 or A000120(f^k(2n+1)) < A000120(2n+1) or A006694((f^k(2n+1)-1)/2) < A006694(n).
In connection with A160198, A160267, A160322 we pose a new (3x+1)-problem: does there exist a finite number of sequences A_i(n), i=1,...,T, such that: 1) A_i(0)=0 and A_i(n)>0 for n>=1; 2) if B_i(n) denotes the least k for which A_i(n)>A_i((f^k(2n+1)-1)/2), then B(n)=min_{i=1,...,T}B_i(n)=1 for every n>=1? Note that this problem is weaker than (3x+1)-Collatz problem. Indeed, if the Collatz conjecture is true, then there exist nonnegative sequences A(n) for which A(0)=0 and A(n)>A((f(2n+1)-1)/2) for every n>=1 (see A160348). - Vladimir Shevelev, May 15 2009

Crossrefs

Programs

  • PARI
    f(n) = ((3*((n-1)/2))+2)/A006519((3*((n-1)/2))+2); \\ Defined for odd n only. Cf. A075677.
    A006519(n) = (1<A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694
    A160322(n) = { my(v=A006694(n), u = (n+n+1), w = hammingweight(u), k=0); while((u >= (n+n+1))&&(hammingweight(u) >= w)&&(A006694((u-1)/2) >= v), k++; u = f(u)); (k); }; \\ Antti Karttunen, Sep 25 2018

Formula

a(n) = min(A122458(n), A159885(n), A160266(n)). - Antti Karttunen, Sep 25 2018

Extensions

a(1) corrected and sequence extended by Antti Karttunen, Sep 25 2018

A195468 Lesser of overpseudo-twin-primes to base 2 defined in Comment.

Original entry on oeis.org

85487, 104651, 253241, 280601, 458987, 580337, 1082399, 1207361, 1251947, 1678541, 2811269, 3090089, 5044031, 5173601, 5590619, 9567671, 10323767, 12263129, 16324001, 18073817, 20647619, 21303341, 22849481, 25080101, 28527047, 33627299, 36307979, 43363601, 45414431
Offset: 1

Views

Author

Vladimir Shevelev, Oct 12 2011

Keywords

Comments

If h_2(n) is the multiplicative order of 2 modulo n, r_2(n) is the number of cyclotomic cosets of 2 modulo n then, by the definition, n is an overpseudoprime to base 2 if h_2(n)*r_2(n)+1=n. These numbers are in A141232.
We call numbers {n,n+2} overpseudo-twin-primes to base 2 if each of them either prime or overpseudoprime to base 2, but no two are primes.

Crossrefs

Extensions

More terms from Amiram Eldar, Sep 21 2019

A220018 Number of cyclotomic cosets of 3 mod 10^n.

Original entry on oeis.org

4, 11, 29, 71, 129, 203, 293, 399, 521, 659, 813, 983, 1169, 1371, 1589, 1823, 2073, 2339, 2621, 2919, 3233, 3563, 3909, 4271, 4649, 5043, 5453, 5879, 6321, 6779, 7253, 7743, 8249, 8771, 9309, 9863, 10433, 11019, 11621, 12239, 12873, 13523, 14189
Offset: 1

Views

Author

V. Raman, Jan 27 2013

Keywords

Examples

			a(2) = 11 because there are 11 cyclotomic cosets of 3 mod 100:
O(0) = {0},
O(1) = {1, 3, 9, 27, 81, 43, 29, 87, 61, 83, 49, 47, 41, 23, 69, 7, 21, 63, 89, 67},
O(2) = {2, 6, 18, 54, 62, 86, 58, 74, 22, 66, 98, 94, 82, 46, 38, 14, 42, 26, 78, 34},
O(4) = {4, 12, 36, 8, 24, 72, 16, 48, 44, 32, 96, 88, 64, 92, 76, 28, 84, 52, 56, 68},
O(5) = {5, 15, 45, 35},
O(10) = {10, 30, 90, 70},
O(11) = {11, 33, 99, 97, 91, 73, 19, 57, 71, 13, 39, 17, 51, 53, 59, 77, 31, 93, 79, 37},
O(20) = {20, 60, 80, 40},
O(25) = {25, 75},
O(50) = {50},
O(55) = {55, 65, 95, 85}.
		

Crossrefs

Cf. A006694.

Programs

  • Mathematica
    a[n_]:=DivisorSum[10^n,EulerPhi[#]/MultiplicativeOrder[3,#]&];Array[a,50] (* Ray Chandler, Jul 03 2023, after Jean-François Alcover *)
  • PARI
    A220018(n)=sumdiv(10^n, d, eulerphi(d)/znorder(Mod(3, d)))

Formula

a(n) = A221855(n) - 1 for all n >= 2, a(1) = A221855(1).
Empirical G.f.: x*(8*x^4-13*x^3-8*x^2+x-4) / (x-1)^3. [Colin Barker, Feb 03 2013]
Conjecture: a(n) = 8*n^2-14*n-1 for n>2. a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>5. [Colin Barker, Apr 14 2013]

Extensions

Edited by M. F. Hasler, Jan 28 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];

A357217 Array read by descending antidiagonals: T(n,k) is the number of cycles of the permutation given by the order of elimination in the Josephus problem for n numbers and a count of k; n, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 2, 2, 4, 1, 1, 1, 2, 5, 1, 2, 2, 2, 1, 6, 1, 1, 1, 2, 1, 1, 7, 1, 2, 2, 2, 1, 2, 4, 8, 1, 1, 3, 2, 3, 3, 3, 2, 9, 1, 2, 2, 2, 3, 2, 2, 2, 1, 10, 1, 1, 1, 2, 1, 3, 3, 2, 3, 5, 11, 1, 2, 2, 2, 3, 2, 2, 4, 5, 2, 2, 12, 1, 1, 1, 2, 3, 1, 3, 2, 3, 1, 3, 2, 13
Offset: 1

Views

Author

Pontus von Brömssen, Sep 18 2022

Keywords

Comments

n >= 2 is a Josephus_k prime if and only if T(n,k) = 1; see A163782-A163800.

Examples

			Array begins:
  n\k|  1  2  3  4  5  6  7  8  9 10
  ---+------------------------------
   1 |  1  1  1  1  1  1  1  1  1  1
   2 |  2  1  2  1  2  1  2  1  2  1
   3 |  3  2  1  2  1  2  3  2  1  2
   4 |  4  2  2  2  2  2  2  2  2  2
   5 |  5  1  1  1  3  3  1  3  3  3
   6 |  6  1  2  3  2  3  2  1  2  3
   7 |  7  4  3  2  3  2  3  2  5  2
   8 |  8  2  2  2  4  2  2  4  6  2
   9 |  9  1  3  5  3  3  3  3  3  3
  10 | 10  5  2  1  2  3  2  1  2  3
For n = 4, k = 2, the order of elimination is (2,4,3,1) (row 4 of A321298). This permutation has two cycles, (1 2 4) and (3), so T(4,2) = 2.
		

Crossrefs

Cf. A003418, A006694 (column k=2), A163782-A163800 (Josephus primes), A198789, A321298 (the Josephus permutations for k=2).

Programs

  • Python
    from sympy.combinatorics import Permutation
    def A357217(n,k):
        return Permutation.josephus(k,n).cycles

Formula

T(n,k+A003418(n)) = T(n,k), i.e., the n-th row is periodic with period A003418(n).
Previous Showing 21-30 of 41 results. Next