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-3 of 3 results.

A102476 Least modulus with 2^n square roots of 1.

Original entry on oeis.org

1, 3, 8, 24, 120, 840, 9240, 120120, 2042040, 38798760, 892371480, 25878772920, 802241960520, 29682952539240, 1217001054108840, 52331045326680120, 2459559130353965640, 130356633908760178920, 7691041400616850556280
Offset: 0

Views

Author

David W. Wilson, Jan 10 2005

Keywords

Comments

The number of square roots of 1 in any modulus is a power of 2.
Another way of expressing the same: These are also the record setting values of m for the number of solutions to "m*k+1 is a square", for some k, 0<=k<=m. There is 1 solution for a(0)=m=1, and for m = a(n), n>0, there is the first occurrence of 2^n solutions. Compare with A006278. - Richard R. Forberg, Mar 18 2016
Also a(n) is the least k such that the proportion of squares in a reduced residue system modulo n is 1/2^n, i.e. A046073(k)/A000010(k) = 1/2^n. - Jianing Song, Nov 12 2019
From Jianing Song, Oct 18 2021: (Start)
a(n) is the smallest k such that rank((Z/kZ)*) = n. The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G. In particular, rank((Z/kZ)*) = 0 if k <= 2 and A046072(k) otherwise.
The number of coprime squares modulo a(n) is given by A046073(a(n)) = A323739(n-1) for n >= 2. (End)

Examples

			a(3) = 24 because 24 is the least modulus with 2^3 square roots of 1, namely 1,5,7,11,13,17,19,23.
		

Crossrefs

Programs

  • Mathematica
    {1, 3}~Join~Table[4 Product[Prime[k], {k, n}], {n, 17}] (* Michael De Vlieger, Mar 27 2016 *)
    nxt[{a_, p_}] := {a*NextPrime[p], NextPrime[p]}; Join[{1,3},NestList[nxt,{8,2},20][[All,1]]] (* or *) Join[{1,3},4*FoldList[ Times, Prime[ Range[ 21]]]](* Harvey P. Dale, Dec 18 2016 *)
  • PARI
    a(n) = if(n<=1, [1,3][n+1], 4*factorback(primes(n-1))) \\ Jianing Song, Oct 19 2021, following David A. Corneth's program for A002110

Formula

a(n) = 4(prime(n-1))# = 4*A002110(n-1) for n >= 2. Least k with A060594(k) = 2^n.

A348420 a(n) = Product_{k=1..n} (p_k - 1)/2 where p_1, p_2, ..., p_n are the first n primes congruent to 3 modulo 4.

Original entry on oeis.org

1, 1, 3, 15, 135, 1485, 22275, 467775, 10758825, 312005925, 10296195525, 360366843375, 14054306891625, 576226582556625, 29387555710387875, 1557540452650557375, 98125048516985114625, 6378128153604032450625, 440090842598678239093125
Offset: 0

Views

Author

Jianing Song, Oct 18 2021

Keywords

Comments

a(n) is the number of coprime squares modulo A348418(n+2), where A348418(n) is the smallest k with rank((Z/kZ)*) = n such that there are an odd number of coprime squares modulo k. (The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G. In particular, rank((Z/kZ)*) = 0 if k <= 2 and A046072(k) otherwise.)

Examples

			A348418(2) = 8, and the number of coprime squares modulo 8 is a(0) = 1;
A348418(3) = 8 * 3 = 24, and the number of coprime squares modulo 24 is a(1) = (3-1)/2 = 1;
A348418(4) = 8 * 3 * 7 = 168, and the number of coprime squares modulo 168 is a(2) = ((3-1)/2) * ((7-1)/2) = 3;
A348418(5) = 8 * 3 * 7 * 11 = 1848, and the number of coprime squares modulo 1848 is a(3) = ((3-1)/2) * ((7-1)/2) * ((11-1)/2) = 15;
A348418(6) = 8 * 3 * 7 * 11 * 19 = 35112, and the number of coprime squares modulo 35112 is a(4) = ((3-1)/2) * ((7-1)/2) * ((11-1)/2) * ((19-1)/2) = 135.
		

Crossrefs

Programs

Formula

a(n) = Product_{k=1..n} (A002145(k) - 1)/2.
a(n) = A046073(A348418(n+2)).

A246541 Take the squares of all P_(n+2)-rough numbers less than the (n+1)-th primorial and mod each by the (n+1)-th primorial. There will be a(n) different results.

Original entry on oeis.org

1, 2, 6, 30, 180, 1440, 12960, 142560, 1995840, 29937600, 538876800, 10777536000, 226328256000, 5205549888000, 135344297088000, 3924984615552000, 117749538466560000, 3885734769396480000, 136000716928876800000, 4896025809439564800000, 190945006568143027200000
Offset: 1

Views

Author

John B. Yin, Aug 29 2014

Keywords

Comments

The P_(n+2)-rough numbers less than the (n+1)-th primorial also comprise the reduced residue system of the (n+1)-th primorial.
The conjectured formula from Jon E. Schoenfield is true. This can be seen by considering that each odd prime p has exactly (p+1)/2 quadratic residues (mod p), of which (p-1)/2 are nonzero. The P_(n+2)-rough numbers less than the (n+1)-th primorial comprise all combinations of nonzero residues modulo the first n+1 primes. So for each odd prime p, the p-1 nonzero residues map to (p-1)/2 (nonzero) residues after squaring. - Bert Dobbelaere, Aug 09 2023

Examples

			For n=2, P_(n+2) = 7.
The 7-rough numbers less than 2*3*5 are 1,7,11,13,17,19,23,29.
The squares of those numbers mod 2*3*5 are 1,19,1,19,19,1,19,1.
There are 2 different results: 1 and 19; so a(2) = 2.
		

Crossrefs

Cf. A002110 (primorial).
Cf. k-rough numbers A007310 (k=5), A007775 (k=7), A008364 (k=11), A008365 (k=13), A008366 (k=17), A166061 (k=19), A166063 (k=23).
Cf. A323739.

Programs

  • Java
    import java.util.TreeSet;
    for(int z = 1; z < 10 ; z++) {
    int n = z;
    int numNumPerLine = 210;
    int[] primes = {2,3,5,7,11,13,17,19,23,29,31,37,41,43};
    int numRepeats = 1;
    int numSpaces = 1;
    for(int i = 0; i < n + 1; i++) {
    numSpaces *= (primes[i] - 1);
    }
    int counter = 0;
    long integerLength = 1;
    for(int i = 0; i < n + 1; i++) {
    integerLength *= primes[i];
    }
    TreeSet numResults = new TreeSet();
    numSpaces/=2;
    for(int i = 1; i < integerLength / 2; i+=2) {
    boolean isInList = true;
    for(int j = 1; j < n + 1; j++) {
    if(i % primes[j] == 0) {
    isInList = false;
    }
    }
    if(isInList) {
    long k = i % integerLength;
    if(k != 0) {
    long l = (k * k) % integerLength;
    if(!numResults.contains(l)) {
    numResults.add(l);
    }
    }
    }
    }
    System.out.println(numResults.size());
    }
    
  • PARI
    a(n) = {hp = prod(k=1, n+1, prime(k)); rp = prod(k=1, n+2, prime(k)); v = []; for (i=1, hp, if (gcd(i, rp) == 1, nv = i^2 % hp; if (! vecsearch(v, nv), v = vecsort(concat(v, nv))););); #v;} \\ Michel Marcus, Sep 06 2014

Formula

Conjecture: a(n) = (1/2^n)*Product_{j=1..n} (prime(j+1)-1) = A005867(n+1)/2^n. - Jon E. Schoenfield, Feb 20 2019
a(n) = A323739(n+1). - Bert Dobbelaere, Aug 09 2023
Showing 1-3 of 3 results.