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.

A345992 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = gcd(n,m).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 5, 1, 1, 2, 1, 4, 3, 2, 1, 8, 1, 2, 1, 7, 1, 5, 1, 1, 11, 2, 7, 4, 1, 2, 3, 5, 1, 6, 1, 11, 9, 2, 1, 3, 1, 2, 17, 4, 1, 2, 5, 7, 3, 2, 1, 15, 1, 2, 9, 1, 5, 11, 1, 4, 23, 14, 1, 8, 1, 2, 3, 19, 7, 6, 1, 5, 1, 2, 1, 4, 17, 2, 29, 8, 1, 9, 13, 23, 3, 2, 19, 32, 1, 2, 11, 4, 1, 17
Offset: 1

Views

Author

Keywords

Comments

By definition, a(n)*A345993(n) = n.
a(n) is even iff n/2 is in A344000. This is true, but essentially trivial, and does not provide any insight into either sequence.
Empirical: For n >= 3, a(n) <= n/3, and a(n) = n/3 iff n is in 3*{2^odd, primes == -1 mod 6}.
If n = 2*p^k where p is an odd prime then m = A344005(n) = p^k - 1 and a(n) = 2. Conversely, it appears that if a(n) = 2 then n is twice an odd prime power. (Corrected by Antti Karttunen, Jun 14 2022)
a(n) = 1 if n is a prime power. - Chai Wah Wu, Jun 01 2022
From Antti Karttunen, Jun 14 2022: (Start)
Conversely, if a(n) = 1 [i.e., A345993(n) = n] then n is a power of prime. (This follows from N. J. A. Sloane's Jul 11 2021 theorem given in A344005).
Apparently, a(n) = 3 iff n = A354984(k) = 3*A137827(k), for some k >= 1.
(End)

Crossrefs

Cf. A011772, A137827, A182665, A344000, A344005, A345993, A345994, A345995, A354930, A354931 (the least occurrence of each n=1..), A354984.
Cf. also A007528, A051119, A284600.

Programs

  • Maple
    # load Findm from A344005
    ans:=[];
    for n from 1 to 40 do t1:=Findm(n)[1]; ans:=[op(ans), igcd(n,t1)]; od:
    ans;
  • Mathematica
    smd[n_]:=Module[{m=1},While[Mod[m(m+1),n]!=0,m++];GCD[n,m]]; Array[smd,110] (* Harvey P. Dale, Jan 07 2022 *)
  • PARI
    f(n) = my(m=1); while ((m*(m+1)) % n, m++); m; \\ A344005
    a(n) = gcd(n,f(n)); \\ Michel Marcus, Aug 06 2021
    (Python 3.8+)
    from math import gcd, prod
    from itertools import combinations
    from sympy import factorint
    from sympy.ntheory.modular import crt
    def A345992(n):
        if n == 1:
            return 1
        plist = tuple(p**q for p, q in factorint(n).items())
        return 1 if len(plist) == 1 else gcd(n,int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))) # Chai Wah Wu, Jun 01 2022

Formula

a(n) = gcd(n, A182665(n)) = gcd(A182665(n), A344005(n)). - Antti Karttunen, Jun 13 2022

A354930 Square array where the row n lists all nonnegative numbers k for which A345992(k) = n, read by falling antidiagonals.

Original entry on oeis.org

1, 2, 6, 3, 10, 12, 4, 14, 21, 20, 5, 18, 39, 36, 15, 7, 22, 48, 52, 30, 42, 8, 26, 57, 68, 40, 78, 28, 9, 34, 75, 84, 55, 114, 35, 24, 11, 38, 93, 100, 65, 150, 56, 72, 45, 13, 46, 111, 116, 80, 186, 77, 88, 63, 110, 16, 50, 129, 148, 115, 222, 105, 136, 90, 310, 33, 17, 54, 147, 164, 130, 258, 133, 152, 126, 410, 44, 156
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2022

Keywords

Comments

Array is read by descending antidiagonals with (n,k) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ... where A(n,k) is the k-th solution x to A345992(x) = n.

Examples

			The top left 15x9 corner of the array:
n\k |  1   2    3    4    5    6    7    8    9   10   11   12   13   14   15
----+--------------------------------------------------------------------------
  1 |  1,  2,   3,   4,   5,   7,   8,   9,  11,  13,  16,  17,  19,  23,  25,
  2 |  6, 10,  14,  18,  22,  26,  34,  38,  46,  50,  54,  58,  62,  74,  82,
  3 | 12, 21,  39,  48,  57,  75,  93, 111, 129, 147, 183, 192, 201, 219, 237,
  4 | 20, 36,  52,  68,  84, 100, 116, 148, 164, 196, 212, 228, 244, 292, 324,
  5 | 15, 30,  40,  55,  65,  80, 115, 130, 155, 180, 205, 215, 230, 255, 265,
  6 | 42, 78, 114, 150, 186, 222, 258, 294, 366, 402, 438, 474, 582, 618, 654,
  7 | 28, 35,  56,  77, 105, 133, 154, 175, 203, 224, 273, 301, 329, 350, 371,
  8 | 24, 72,  88, 136, 152, 200, 216, 264, 328, 344, 392, 456, 472, 536, 584,
  9 | 45, 63,  90, 126, 144, 171, 207, 225, 252, 288, 333, 369, 387, 414, 450,
		

Crossrefs

Column 1: A354931.
Rows 1..3: A000961, A278568 (without its initial 2, conjectured), A354984 (conjectured).
See also array A354940 where the entries are divided by their row index.

Programs

  • PARI
    up_to = 105;
    A345992(n) = for(m=1, oo, if((m*(m+1))%n==0, return(gcd(n,m))));
    memoA354930sq = Map();
    A354930sq(n, k) = { my(v=0); if(!mapisdefined(memoA354930sq,[n,k-1],&v),if(1==k, v=0, v = A354930sq(n, k-1))); for(i=1+v,oo,if(A345992(i)==n,mapput(memoA354930sq,[n,k],i); return(i))); };
    A354930list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A354930sq(col,(a-(col-1))))); (v); };
    v354930 = A354930list(up_to);
    A354930(n) = v354930[n];

A354932 a(n) = 1/n * {the least k for which A345992(k) = n}.

Original entry on oeis.org

1, 3, 4, 5, 3, 7, 4, 3, 5, 11, 3, 13, 7, 5, 4, 7, 3, 19, 4, 7, 11, 9, 3, 7, 13, 9, 4, 17, 3, 31, 4, 3, 17, 5, 9, 31, 5, 11, 5, 9, 3, 17, 4, 5, 13, 31, 3, 7, 5, 17, 4, 19, 3, 5, 7, 19, 23, 9, 3, 61, 8, 7, 8, 5, 11, 19, 4, 23, 7, 47, 3, 29, 7, 5, 19, 9, 13, 47, 4, 7, 13, 11, 3, 17, 16, 23, 4, 23, 3, 13, 4, 31, 11, 5
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2022

Keywords

Comments

The first four terms that are not powers of primes are: a(112) = 15, a(122) = 35, a(145) = 33, a(155) = 12.
Question: Are 2, 3, 4, 6, 10, 12, 18, 30, 60 the only n such that a(n) = 1+n?

Crossrefs

Column 1 of A354940.

Programs

  • Mathematica
    s[n_] := Module[{m = 1}, While[!Divisible[m*(m+1), n], m++]; GCD[n, m]]; a[n_] := Module[{k = n}, While[s[k] != n, k+=n]; k/n]; Array[a, 100] (* Amiram Eldar, Jun 15 2022 *)
  • PARI
    A345992(n) = gcd(n,A344005(n));
    A354932(n) = for(k=1,oo,if(A345992(k)==n,return(k/n)));

Formula

a(n) = A354931(n) / n.
Showing 1-3 of 3 results.