

A322273


Smallest multiplication factors f, prime or 1, for all b (mod 840), coprime to 840 (= 4*7#), so that b*f is a nonzero square mod 8, mod 3, mod 5, and mod 7.


7



1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 43, 71, 73, 79, 83, 41, 73, 101, 103, 107, 109, 113, 1, 127, 59, 113, 19, 47, 29, 79, 13, 43, 47, 1, 173, 11, 61, 283, 71, 193, 53, 31, 41, 211, 29, 103, 83, 61, 113, 71, 241, 127, 59, 37, 17, 23
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

See sequence A322269 for further explanations. This sequence is related to A322269(4).
The sequence is periodic, repeating itself after phi(840) = 192 terms. Its largest term is 311, which is A322269(4). In order to satisfy the conditions, both f and b must be coprime to 840. Otherwise, the product would be zero mod a prime <= 7.
The b(n) corresponding to each a(n) is A008364(n).
The first 15 terms are trivial: f=b, and then the product b*f naturally is a square modulo everything.


LINKS

Hans Ruegg, Table of n, a(n) for n = 1..192


EXAMPLE

The 16th number coprime to 840 is 67. a(16) is 43, because 43 is the smallest prime with which we can multiply 67, so that the product (67*43 = 2881) is a square mod 8, mod 2, mod 3, mod 5, and mod 7.


PROG

(PARI)
QresCode(n, nPrimes) = {
code = bitand(n, 7)>>1;
for (j=2, nPrimes,
x = Mod(n, prime(j));
if (issquare(x), code += (1<<j));
);
return (code);
}
QCodeArray(n) = {
totalEntries = 1<<(n+1);
f = vector(totalEntries);
f[totalEntries3] = 1; \\ 1 has always the same code: ...111100
counter = 1;
forprime(p=prime(n+1), +oo,
code = QresCode(p, n);
if (f[code+1]==0,
f[code+1]=p;
counter += 1;
if (counter==totalEntries, return(f));
)
)
}
sequence(n) = {
f = QCodeArray(n);
primorial = prod(i=1, n, prime(i));
entries = eulerphi(4*primorial);
a = vector(entries);
i = 1;
forstep (x=1, 4*primorial1, 2,
if (gcd(x, primorial)==1,
a[i] = f[QresCode(x, n)+1];
i += 1;
);
);
return(a);
}
\\ sequence(4) returns this sequence.
\\ sequence(2) returns A322271, sequence(3) returns A322272, ... sequence(6) returns A322275.


CROSSREFS

Cf. A322269, A322271, A322272, A322274, A322275, A008364.
Sequence in context: A084374 A063193 A056758 * A096489 A008364 A140461
Adjacent sequences: A322270 A322271 A322272 * A322274 A322275 A322276


KEYWORD

nonn,fini,full


AUTHOR

Hans Ruegg, Dec 01 2018


STATUS

approved



