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-10 of 14 results. Next

A307162 a(n) is the smallest k such that A319100(k) = A025610(n).

Original entry on oeis.org

1, 3, 8, 7, 24, 21, 120, 56, 1320, 63, 168, 22440, 252, 840, 516120, 504, 9240, 819, 14967480, 2184, 157080, 3276, 613666680, 10920, 3612840, 6552, 28842333960, 120120, 15561, 104772360, 32760, 1528643699880, 2042040, 62244, 4295666760, 207480, 90189978292920, 46966920, 124488
Offset: 1

Views

Author

Jianing Song, Mar 27 2019

Keywords

Comments

A025610 is the range of A319100.
Let b = A319100. Note that:
- if k is an odd number, then b(2*k) = b(k), b(4*k) = 2*b(k), b(2^e*k) = 4*b(k) for e >= 3;
- if k is not divisible by 3, then b(3*k) = 2*b(k), b(3^e*k) = 6*b(k) for e >= 2;
- for all primes p > 3, if k is not divisible by p, then b(p^e*k) = b(p*k).
As a result, it is easy to see that for every n, a(n) is not congruent to 2 modulo 4 and is not divisible by 16 or 27 or p^2 for any prime p > 3.

Crossrefs

Programs

  • PARI
    isA025610(n) = omega(6*n)==2&&valuation(n,2)>=valuation(n,3)
    b(n) = if(isA025610(n), i=1; while(A319100(i)!=n, i++); i)
    for(n=1, 216, if(isA025610(n), print1(b(n), ", "))) \\ See A319100 for its program
    
  • PARI
    p(j) = my(t=0,v=vector(j)); for(k=1, oo, if(prime(k)%6==1, t++; v[t]=prime(k)); if(t==j, return(v)))
    q(i) = my(t=0,v=vector(i)); for(k=1, oo, if(prime(k)%6==5, t++; v[t]=prime(k)); if(t==i, return(v)))
    b(i,j) = {
    if(j<=1 && i<=2, my(M=[1,3,8;7,21,56]); return(M[j+1,i+1]));
    if(j==0 && i>=3, my(Q=q(i-3)); return(24*prod(k=1, i-3, Q[k])));
    if(j>=2 && i<=2, my(P=p(j-1), w=[9,36,72]); return(w[i+1]*prod(k=1, j-1, P[k])));
    if(j>=1 && i>=3, my(P=p(j), Q=q(i-2)); return(prod(k=1, j-1, P[k])*8*prod(k=1, i-3, Q[k])*min(9*Q[i-2], 3*P[j])));
    }
    list(lim) = my(v=A025610(lim), u=vector(#v)); for(k=1, #v, my(i=valuation(v[k],2)-valuation(v[k],3), j=valuation(v[k],3)); u[k]=b(i,j)); u \\ Jianing Song, Jun 04 2019, See A025610 for its program

Formula

Let p(j) = A002476(j), q(i) = A007528(i), P(j) = Product_{k=1..j} p(k) = A121940(j) if j > 0, Q(i) = Product_{k=1..i} q(k) = A057130(i) if i > 0. If A025610(n) = 2^i*6^j, then:
(a) if i = 0, then a(n) = 1 if j = 0, 7 if j = 1 and 9*P(j-1) if j >= 2;
(b) if i = 1, then a(n) = 3 if j = 0, 21 if j = 1 and 36*P(j-1) if j >= 2;
(c) if i = 2, then a(n) = 8 if j = 0, 56 if j = 1 and 72*P(j-1) if j >= 2;
(d) if i >= 3, then a(n) = 24*Q(i-3) if j = 0 and P(j-1)*8*Q(i-3)*min{9*q(i-2), 3*p(j)} if j >= 1. [Rewritten by Jianing Song, Jun 04 2019]

A307251 Numbers k for which A319100(k) sets a new record.

Original entry on oeis.org

1, 3, 7, 21, 56, 63, 168, 252, 504, 819, 2184, 3276, 6552, 15561, 32760, 62244, 124488, 482391, 622440, 1929564, 3859128, 17848467, 19295640, 71393868, 142787736, 713938680, 3069936324, 6139872648, 30699363240, 187266115764, 337692995640, 374532231528
Offset: 1

Views

Author

Jianing Song, Mar 31 2019

Keywords

Comments

Let b = A319100 and v(k, p) be the p-adic valuation of k. Note that:
- if k is an odd number, then b(2*k) = b(k), b(4*k) = 2*b(k), b(2^e*k) = 4*b(k) for e >= 3;
- if k is not divisible by 3, then b(3*k) = 2*b(k), b(3^e*k) = 6*b(k) for e >= 2;
- for all primes p > 3, if k is not divisible by p, then b(p^e*k) = b(p*k).
As a result, every term k of this sequence satisfies: v(k, 2) = 0, 2 or 3, v(k, 3) <= 2 and v(k, p) <= 1 for all primes p > 3.
All terms k such that v(k, 3) = 1 are k = 3, 21, 168 and 2184. Proof:
- if k has a prime factor q == 5 (mod 6) or v(k, 2) = 2 (let q = 4), then b(9/(3*q)*k) = 6*b(k/(3*q)) = (3/2)*b(k), but 9/(3*q) < 1;
- if k has a prime factor p == 1 (mod 6) and p >= 19, then b((9*5)/(3*p)*k) = b(k), but (9*5)/(3*p) < 1.
So all terms k such that v(k, 3) = 1 are of the form k = 3*8^e*7^f*13^g, where 0 <= e <= f <= 1, 0 <= g <= f <= 1, but note that 3*7*13 = 273 is not a term because b(252) = b(273).
It is easy to see that all the other terms are of the form F, where F(i,j) = Product_{s=1..i} (p_s)*Product_{t=1..j} (q_t), where p_1 = 7, p_2 = 9, p_s = A002476(s-1) for s >= 3; q_1 = 4, q_2 = 2, q_t = A007528(t-2) for t >= 3. This is because F(i,j) is the smallest number k such that v(k, 3) != 1 and that b(k) = 6^i*2^j. Other than 4, 28 and 2520, the number F(i,j) is a term if and only if for all i', j' such that F(i',j') < F(i,j) we have 6^i'*2^j' < 6^i*2^j. (Note that 4, 28 and 2520 are of the form F and they satisfy this but they are not terms.)
Equivalently, a number k other than 3, 21, 168, 2184 and 4, 28, 2520 is a term if and only if k is of the form F and: (a) for any u, v such that u <= i and 6^u < 2^v, Product_{s=i-u+1..i} (p_s) < Product_{t=j+1..j+v} (q_t); (b) for any u, v such that v <= j and 6^u > 2^v, Product_{s=i+1..i+u} (p_s) > Product_{t=j-v+1..j} (q_t).
Specially, if a number k other than 3, 21, 168, 2184 and 4, 28, 2520 is a term, then k is of the form F and: (a') p_i < (q_(j+1))*(q_(j+2))*(q_(j+3)); (b') p_(i+1) > (q_(j-1))*(q_j). From this we can see that for every prime r, there are only finitely many terms that are not divisible by r (the largest term not divisible by 5 is (7*9*13*19*...*919)*(4*2) = 1.1832*10^190, nevertheless). But note that these are not sufficient. For example, k = (7*9*13*19*...*55819*55831*55837*55849)*(4*2*5*11*17*23) is not a term because although 55849 < 29*41*47, 55831*55837*55849 > 29*41*...*89 so k' = (7*9*13*19*...*55819)*(4*2*5*11*...*89) have k' < k but b(k') = (256/216)*b(k). Similarly, k = (7*9*13*19*...*643*661)*(4*2*5*11*17*23*29) is not a term because although 23*29 < 673, 5*11*17*23*29 > 673*691 so k' = (7*9*13*19*...*643*661*673*691)*(4*2) have k' < k but b(k') = (36/32)*b(k).

Examples

			A319100(504) = 144 which is larger than A319100(i) for i < 504, so 144 is a term.
		

Crossrefs

For the records see A307252.

Programs

  • PARI
    P(n) = if(!n, 1, if(n==1, 7, my(i=0,N=9); forprime(p=7, oo, if(p%3==1, i++; N*=p); if(i==n-1, return(N)))))
    Q(n) = if(!n, 1, if(n==1, 4, my(i=0,N=4); forprime(p=2, oo, if(p%3==2, i++; N*=p); if(i==n-1, return(N)))))
    v = []; for(i=0, 15, for(j=0, 15, if(P(i)*Q(j) < min(P(16), Q(16)), v=concat(v, [P(i)*Q(j)])))); v=vecsort(v);
    u = []; for(i=1, #v, if(sum(j=1, i-1, A319100(v[j]) >= A319100(v[i]))==0, u=concat(u, [v[i]])));
    vecsort(concat(select(i->(i!=4&&i!=28&&i!=2520), u), [3, 21, 168, 2184])) \\ See A319100 for its program

A307252 Records in A319100.

Original entry on oeis.org

1, 2, 6, 12, 24, 36, 48, 72, 144, 216, 288, 432, 864, 1296, 1728, 2592, 5184, 7776, 10368, 15552, 31104, 46656, 62208, 93312, 186624, 373248, 559872, 1119744, 2239488, 3359232, 4478976, 6718464, 13436928, 20155392, 26873856, 40310784, 80621568, 120932352
Offset: 1

Views

Author

Jianing Song, Mar 31 2019

Keywords

Comments

All terms are of the form 6^u*2^j. Other than the term 48, k = 6^i*2^j is a term if and only if for all i', j' such that F(i',j') < F(i,j) we have 6^i'*2^j' < 6^i*2^j, where F(i,j) = Product_{s=1..i} (p_s)*Product_{t=1..j} (q_t), where p_1 = 7, p_2 = 9, p_s = A002476(s-1) for s >= 3; q_1 = 4, q_2 = 2, q_t = A007528(t-2) for t >= 3. Or equivalently: (a) for any u, v such that u <= i and 6^u < 2^v, Product_{s=i-u+1..i} (p_s) < Product_{t=j+1..j+v} (q_t); (b) for any u, v such that v <= j and 6^u > 2^v, Product_{s=i+1..i+u} (p_s) > Product_{t=j-v+1..j} (q_t). For example, 746496 = 6^6*2^4 is not a term because (q_3)*(q_4) = 5*11 > p_7 = 43.

Examples

			A319100(168) = 48 which is larger than A319100(i) for i < 168, so 48 is a term.
		

Crossrefs

Programs

  • PARI
    P(n) = if(!n, 1, if(n==1, 7, my(i=0,N=9); forprime(p=7, oo, if(p%3==1, i++; N*=p); if(i==n-1, return(N)))))
    Q(n) = if(!n, 1, if(n==1, 4, my(i=0,N=4); forprime(p=2, oo, if(p%3==2, i++; N*=p); if(i==n-1, return(N)))))
    v = []; for(i=0, 15, for(j=0, 15, if(P(i)*Q(j) < min(P(16), Q(16)), v=concat(v, [P(i)*Q(j)])))); v=vecsort(v);
    u = []; for(i=1, #v, if(sum(j=1, i-1, A319100(v[j]) >= A319100(v[i]))==0, u=concat(u, [A319100(v[i])])));
    vecsort(concat(u, [48])) \\ See A319100 for its program

A319838 Numbers k such that A319100(k) is a power of 6.

Original entry on oeis.org

1, 2, 7, 9, 13, 14, 18, 19, 26, 27, 31, 37, 38, 43, 49, 54, 61, 62, 63, 67, 73, 74, 79, 81, 86, 91, 97, 98, 103, 109, 117, 122, 126, 127, 133, 134, 139, 146, 151, 157, 158, 162, 163, 169, 171, 181, 182, 189, 193, 194, 199, 206, 211, 217, 218, 223, 229, 234, 241
Offset: 1

Views

Author

Jianing Song, Sep 28 2018

Keywords

Comments

Numbers k such that the number of solutions to x^6 == 1 (mod k) is a power of 6.
Also numbers k such that (Z/kZ)* has the same 2-rank and 3-rank, where (Z/kZ)* is the multiplicative group of integers modulo k, and the p-rank of a finite abelian group G is equal to log_p(#{x belongs to G : x^p = 1}) with p being a prime number.
k is a term in this sequence iff v(2, k) = 0 or 1, v(3, k) = 0 or >= 2 and k is not divisible by any prime p == 5 (mod 6). Here v(p, k) is the p-adic valuation of k.
Sequence contains all primes p == 1 (mod 6) and their powers and all powers of 3 except for 3 itself.
Decompose the multiplicative group of integers modulo k as a product of cyclic groups C_{s_1} x C_{s_2} x ... x C_{s_m}, where s_i divides s_j for i < j, then k is a term iff s_1 is divisible by 6. For k = 1 or 2, (Z/kZ)* is the trivial group, s_1 does not exist so 1 and 2 are also terms.
If gcd(k_1, k_2) = 1 and both k_1 and k_2 are in this sequence, so is k_1*k_2. For example, 7 and 9 are both here so 7*9 = 63 is also here. Indeed, the number of solutions to x^6 == 1 (mod 7), x^6 == 1 (mod 9) and x^6 == 1 (mod 36) are 6, 6 and 36, respectively.
This is an analog of A008784, since k is a term there iff s_1 (defined as above) is divisible by 4 instead of 6. But on the other hand, if k is in A008784, so are all its divisors, while this is not true for this sequence. However, if k is here and k is not divisible by 9, then all its divisors are also here.
This is a also an analog of A192453 (s_1 divisible by 8).

Examples

			91 = 7*13 is a term since the number of solutions to x^6 == 1 (mod 91) is 36 = 6^2.
1197 = 7*9*19 is a term since the number of solutions to x^6 == 1 (mod 1197) is 216 = 6^3.
		

Crossrefs

Programs

  • PARI
    isA319838(n) = if(abs(n)==1||abs(n)==2, 1, my(i=znstar(n)[2]); !(i[#i]%6)==1, 1)

A060839 Number of solutions to x^3 == 1 (mod n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 3, 3, 1, 1, 3, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 9, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, 3, 1, 1, 1, 3, 9, 1, 3, 1, 3, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), May 02 2001

Keywords

Comments

Sum_{k=1..n} a(k) appears to be asymptotic to C*n*log(n) with C = 0.4... - Benoit Cloitre, Aug 19 2002 [C = (11/(6*Pi*sqrt(3))) * Product_{p prime == 1 (mod 3)} (1 - 2/(p*(p+1))) = 0.3170565167... (Finch and Sebah, 2006). - Amiram Eldar, Mar 26 2021]

Examples

			a(7) = 3 because the three solutions to x^3 == 1 (mod 7) are x = 1,2,4.
		

Crossrefs

Cf. A005088, A357905 (base-3 logarithm).
Number of solutions to x^k == 1 (mod n): A060594 (k=2), this sequence (k=3), A073103 (k=4), A319099 (k=5), A319100 (k=6), A319101 (k=7), A247257 (k=8).
Column 3 of A354057.

Programs

  • Maple
    A060839 := proc(n)
        local a,pf,p,r;
        a := 1 ;
        for pf in ifactors(n)[2] do
            p := op(1,pf);
            r := op(2,pf);
            if p = 2 then
                ;
            elif p =3 then
                if r >= 2 then
                    a := a*3 ;
                end if;
            else
                if modp(p,3) = 2 then
                    ;
                else
                    a := 3*a ;
                end if;
            end if;
        end do:
        a ;
    end proc:
    seq(A060839(n),n=1..40) ; # R. J. Mathar, Mar 02 2015
  • Mathematica
    a[n_] := Sum[ If[ Mod[k^3-1, n] == 0, 1, 0], {k, 1, n}]; Table[ a[n], {n, 1, 105}](* Jean-François Alcover, Nov 14 2011, after PARI *)
    f[p_, e_] := If[Mod[p, 3] == 1, 3, 1]; f[3, 1] = 1; f[3, e_] := 3; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    a(n)=sum(i=1,n,if((i^3-1)%n,0,1))
    
  • PARI
    a(n)=my(f=factor(n)); prod(i=1, #f~, if(f[i, 1]==3, 3^min(f[i, 2]-1, 1), if(f[i, 1]%3==1, 3, 1))) \\ Jianing Song, Oct 21 2022
  • Python
    from math import prod
    from sympy import factorint
    def A060839(n): return prod(3 for p, e in factorint(n).items() if (p!=3 or e!=1) and p%3!=2) # Chai Wah Wu, Oct 19 2022
    

Formula

Let b(n) be the number of primes dividing n which are congruent to 1 (mod 3) (sequence A005088); then a(n) is 3^b(n) if n is not divisible by 9 and 3^(b(n) + 1) if n is divisible by 9.
Multiplicative with a(3) = 1, a(3^e) = 3, e >= 2, a(p^e) = 3 for primes p of the form 3k+1, a(p^e) = 1 for primes p of the form 3k+2. - David W. Wilson, May 22 2005 [Corrected by Jianing Song, Oct 21 2022]
If the multiplicative group of integers modulo n has (Z/nZ)* = C_{k_1} X C_{k_2} X ... X C_{k_r}, then a(n) = Product_{i=1..r} gcd(3,k_r). - Jianing Song, Oct 21 2022

A319099 Number of solutions to x^5 == 1 (mod n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Jianing Song, Sep 10 2018

Keywords

Comments

All terms are powers of 5. Those n such that a(n) > 1 are in A066500.

Examples

			Solutions to x^5 == 1 (mod 11): x == 1, 3, 4, 5, 9 (mod 11).
Solutions to x^5 == 1 (mod 25): x == 1, 6, 11, 16, 21 (mod 25) (x == 1 (mod 5)).
Solutions to x^5 == 1 (mod 31): x == 1, 2, 4, 8, 16 (mod 31).
		

Crossrefs

Number of solutions to x^k == 1 (mod n): A060594 (k=2), A060839 (k=3), A073103 (k=4), this sequence (k=5), A319100 (k=6), A319101 (k=7), A247257 (k=8).
Mobius transform gives A307380.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 5] == 1, 5, 1]; f[5, 1] = 1; f[5, e_] := 5; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    a(n)=my(Z=znstar(n)[2]); prod(i=1,#Z,gcd(5,Z[i]));

Formula

Multiplicative with a(5) = 1, a(5^e) = 5 if e >= 2; for other primes p, a(p^e) = 5 if p == 1 (mod 5), a(p^e) = 1 otherwise.
If the multiplicative group of integers modulo n is isomorphic to C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j; then a(n) = Product_{i=1..m} gcd(5, k_i).
a(n) = A000010(n)/A293482(n). - Jianing Song, Nov 10 2019

A319101 Number of solutions to x^7 == 1 (mod n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7
Offset: 1

Views

Author

Jianing Song, Sep 10 2018

Keywords

Comments

All terms are powers of 7. Those n such that a(n) > 1 are in A066502.

Examples

			Solutions to x^7 == 1 (mod 29): x == 1, 7, 16, 20, 23, 24, 25 (mod 29).
Solutions to x^7 == 1 (mod 43): x == 1, 4, 11, 16, 21, 35, 41 (mod 43).
Solutions to x^7 == 1 (mod 49): x == 1, 8, 15, 22, 29, 36, 43 (mod 49) (x == 1 (mod 7)).
		

Crossrefs

Number of solutions to x^k == 1 (mod n): A060594 (k=2), A060839 (k=3), A073103 (k=4), A319099 (k=5), A319100 (k=6), this sequence (k=7), A247257 (k=8).
Mobius transform gives A307382.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 7] == 1, 7, 1]; f[7, 1] = 1; f[7, e_] := 7; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    a(n)=my(Z=znstar(n)[2]); prod(i=1, #Z, gcd(7, Z[i]))

Formula

Multiplicative with a(7) = 1, a(7^e) = 7 if e >= 2; for other primes p, a(p^e) = 7 if p == 1 (mod 7), a(p^e) = 1 otherwise.
If the multiplicative group of integers modulo n is isomorphic to C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j; then a(n) = Product_{i=1..m} gcd(7, k_i).
a(n) = A000010(n)/A293484(n). - Jianing Song, Nov 10 2019

A247257 The number of octic characters modulo n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 2, 4, 2, 4, 2, 4, 4, 2, 8, 8, 8, 2, 2, 8, 4, 2, 2, 8, 4, 4, 2, 4, 4, 8, 2, 16, 4, 8, 8, 4, 4, 2, 8, 16, 8, 4, 2, 4, 8, 2, 2, 16, 2, 4, 16, 8, 4, 2, 8, 8, 4, 4, 2, 16, 4, 2, 4, 16, 16, 4, 2, 16, 4, 8, 2, 8, 8, 4, 8, 4, 4, 8, 2, 32
Offset: 1

Views

Author

R. J. Mathar, Mar 02 2015

Keywords

Comments

Number of solutions to x^8 == 1 (mod n). - Jianing Song, Nov 10 2019

Crossrefs

Number of solutions to x^k == 1 (mod n): A060594 (k=2), A060839 (k=3), A073103 (k=4), A319099 (k=5), A319100 (k=6), A319101 (k=7), this sequence (k=8).

Programs

  • Maple
    A247257 := proc(n)
        local a,pf,p,r;
        a := 1 ;
        for pf in ifactors(n)[2] do
            p := op(1,pf);
            r := op(2,pf);
            if p = 2 then
                if r >= 5 then
                    a := a*16 ;
                else
                    a := a*op(r,[1,2,4,8]) ;
                end if;
            elif modp(p,4) = 3 then
                a := a*2;
            elif modp(p,8) = 5 then
                a := a*4;
            elif modp(p,8) = 1 then
                a := a*8;
            else
                error
            end if;
        end do:
        a ;
    end proc:
  • Mathematica
    g[p_, e_] := Which[p==2, 2^Min[e-1, 4], Mod[p, 4]==3, 2, Mod[p, 8]==5, 4, True, 8];
    a[1] = 1; a[n_] := Times @@ g @@@ FactorInteger[n];
    Array[a, 80] (* Jean-François Alcover, Nov 26 2017, after Charles R Greathouse IV *)
  • PARI
    g(p,e)=if(p==2, 2^min(e-1,4), if(p%4==3, 2, if(p%8==5, 4, 8)))
    a(n)=my(f=factor(n)); prod(i=1,#f~, g(f[i,1],f[i,2])) \\ Charles R Greathouse IV, Mar 02 2015

Formula

Multiplicative with a(p^e) = p^min(e-1, 4) if p = 2, gcd(8, p-1) if p > 2. - Jianing Song, Nov 10 2019

A307381 Number of sextic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 5, 2, 4, 0, 1, 1, 5, 0, 1, 0, 1, 0, 5, 1, 5, 0, 1, 2, 0, 0, 0, 5, 1, 0, 5, 0, 1, 0, 5, 4, 5, 0, 5, 2, 1, 0, 5, 1, 4, 0, 1, 0, 0, 0, 1, 5, 1, 0, 1, 10, 5, 0, 1, 1, 5, 0, 20, 0, 5, 0, 5, 1, 1, 0, 1, 8, 5, 0, 0, 5, 5, 0, 5, 0, 0, 0, 1, 5, 1, 0, 1
Offset: 1

Views

Author

Jianing Song, Apr 06 2019

Keywords

Comments

a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a six-power root of unity (1, (1 + sqrt(3)*i)/2, (-1 + sqrt(3)*i)/2, -1, (-1 - sqrt(3)*i)/2, (1 - sqrt(3)*i)/2).
Mobius transform of A319100.

Examples

			Let w = exp(2*Pi/6) = (1 + sqrt(3)*i)/2. For n = 19, the 5 sextic primitive Dirichlet characters modulo n are:
  Chi_1 = [0, 1, w, w, w - 1, -w, w - 1, 1, -1, w - 1, -w + 1, 1, -1, -w + 1, w, -w + 1, -w, -w, -1];
  Chi_2 = [0, 1, w - 1, w - 1, -w, w - 1, -w, 1, 1, -w, -w, 1, 1, -w, w - 1, -w, w - 1, w - 1, 1];
  Chi_3 = [0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1];
  Chi_4 = [0, 1, -w, -w, w - 1, -w, w - 1, 1, 1, w - 1, w - 1, 1, 1, w - 1, -w, w - 1, -w, -w, 1];
  Chi_5 = [0, 1, -w + 1, -w + 1, -w, w - 1, -w, 1, -1, -w, w, 1, -1, w, -w + 1, w, w - 1, w - 1, -1],
so a(19) = 5.
		

Crossrefs

Number of k-th power primitive Dirichlet characters modulo n: A114643 (k=2), A160498 (k=3), A160499 (k=4), A307380 (k=5), this sequence (k=6), A307382 (k=7), A329272 (k=8).
Cf. A319100 (number of solutions to x^6 == 1 (mod n)).

Programs

  • Mathematica
    f[2, e_] := Which[e == 1, 0, e == 2, 1, e == 3, 2, e >= 4, 0]; f[3, e_] := Which[e == 1, 1, e == 2, 4, e >= 3, 0]; f[p_, 1] := If[Mod[p, 6] == 1, 5, 1]; f[p_, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)={
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2, if(e==3, r*=2, if(e!=2, r=0; return(r))));
            if(p==3, if(e==2, r*=4, if(e!=1, r=0; return(r))));
            if(p>3, if(p%6==1&&e==1, r*=5, if(e!=1, r=0; return(r))));
        );
        return(r);
    } \\ Jianing Song, Nov 10 2019

Formula

Multiplicative with a(4) = 1, a(8) = 2, a(2^e) = 0 for e = 1 or e >= 4; a(3) = 1, a(9) = 4, a(3^e) = 0 for e >= 3; a(p) = 5 if p == 1 (mod 6) and 1 if p == 5 (mod 6), a(p^e) = 0 if p > 3 and e >= 2.

A192453 Numbers k such that -1 is a 4th power mod k.

Original entry on oeis.org

1, 2, 17, 34, 41, 73, 82, 89, 97, 113, 137, 146, 178, 193, 194, 226, 233, 241, 257, 274, 281, 289, 313, 337, 353, 386, 401, 409, 433, 449, 457, 466, 482, 514, 521, 562, 569, 577, 578, 593, 601, 617, 626, 641, 673, 674, 697, 706, 761, 769, 802, 809, 818, 857
Offset: 1

Views

Author

Keywords

Comments

Complement of A192452. Subsequence of A008784. A further reduction to 8th powers yields 1, 2, 17, 34, 97, 113, 193, 194, ...
From Jianing Song, Mar 31 2019: (Start)
k is a term if and only if k is not divisible by 4 and all odd prime factors are congruent to 1 modulo 8. If k is a term of this sequence, then so are all divisors of k.
Decompose the multiplicative group of integers modulo k as a product of cyclic groups C_{s_1} x C_{s_2} x ... x C_{s_m}, where s_i divides s_j for i < j, then k is a term iff s_1 is divisible by 8. For k = 1 or 2, (Z/kZ)* is the trivial group, s_1 does not exist so 1 and 2 are also terms. This is an analog of A008784 (where s_1 is divisible by 4) and A319100 (where s_1 is divisible by 6). (End)

Examples

			1^4 == -1 (mod 1). 2^4 == -1 (mod 17). 9^4 == -1 (mod 34). 3^4 == -1 (mod 41). 10^4 == -1 (mod 73).
		

Crossrefs

Programs

  • Maple
    select(n -> numtheory:-factorset(n) mod 8 subset {1,2}, [seq(seq(4*i+j,j=1..3),i=0..400)]); # Robert Israel, May 24 2019
  • Mathematica
    Table[If[Reduce[x^4==-1,Modulus->n]===False,Null,n],{n,2,1000}]//Union
  • PARI
    for(n=1,1e3,if(ispower(Mod(-1,n),4),print1(n", "))) \\ Charles R Greathouse IV, Jul 03 2011
Showing 1-10 of 14 results. Next