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.

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.

This page as a plain text file.
%I A246541 #41 Feb 16 2025 08:33:23
%S A246541 1,2,6,30,180,1440,12960,142560,1995840,29937600,538876800,
%T A246541 10777536000,226328256000,5205549888000,135344297088000,
%U A246541 3924984615552000,117749538466560000,3885734769396480000,136000716928876800000,4896025809439564800000,190945006568143027200000
%N 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.
%C A246541 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.
%C A246541 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
%H A246541 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Primorial.html">Primorial</a>
%H A246541 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RoughNumber.html">Rough Number</a>
%F A246541 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
%F A246541 a(n) = A323739(n+1). - _Bert Dobbelaere_, Aug 09 2023
%e A246541 For n=2, P_(n+2) = 7.
%e A246541 The 7-rough numbers less than 2*3*5 are 1,7,11,13,17,19,23,29.
%e A246541 The squares of those numbers mod 2*3*5 are 1,19,1,19,19,1,19,1.
%e A246541 There are 2 different results: 1 and 19; so a(2) = 2.
%o A246541 (Java)
%o A246541 import java.util.TreeSet;
%o A246541 for(int z = 1; z < 10 ; z++) {
%o A246541 int n = z;
%o A246541 int numNumPerLine = 210;
%o A246541 int[] primes = {2,3,5,7,11,13,17,19,23,29,31,37,41,43};
%o A246541 int numRepeats = 1;
%o A246541 int numSpaces = 1;
%o A246541 for(int i = 0; i < n + 1; i++) {
%o A246541 numSpaces *= (primes[i] - 1);
%o A246541 }
%o A246541 int counter = 0;
%o A246541 long integerLength = 1;
%o A246541 for(int i = 0; i < n + 1; i++) {
%o A246541 integerLength *= primes[i];
%o A246541 }
%o A246541 TreeSet<Long> numResults = new TreeSet<Long>();
%o A246541 numSpaces/=2;
%o A246541 for(int i = 1; i < integerLength / 2; i+=2) {
%o A246541 boolean isInList = true;
%o A246541 for(int j = 1; j < n + 1; j++) {
%o A246541 if(i % primes[j] == 0) {
%o A246541 isInList = false;
%o A246541 }
%o A246541 }
%o A246541 if(isInList) {
%o A246541 long k = i % integerLength;
%o A246541 if(k != 0) {
%o A246541 long l = (k * k) % integerLength;
%o A246541 if(!numResults.contains(l)) {
%o A246541 numResults.add(l);
%o A246541 }
%o A246541 }
%o A246541 }
%o A246541 }
%o A246541 System.out.println(numResults.size());
%o A246541 }
%o A246541 (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
%Y A246541 Cf. A002110 (primorial).
%Y A246541 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).
%Y A246541 Cf. A323739.
%K A246541 nonn
%O A246541 1,2
%A A246541 _John B. Yin_, Aug 29 2014