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.

Previous Showing 11-13 of 13 results.

A333923 a(n) is the smallest positive integer such that n^a(n) is divisible by n+a(n).

Original entry on oeis.org

2, 6, 4, 20, 3, 42, 8, 18, 6, 110, 4, 156, 14, 10, 16, 272, 6, 342, 5, 6, 10, 506, 3, 100, 6, 54, 4, 812, 6, 930, 32, 48, 30, 14, 12, 1332, 26, 42, 10, 1640, 6, 1806, 20, 30, 18, 2162, 6, 294, 14, 30, 12, 2756, 10, 66, 8, 24, 6, 3422, 4, 3660, 62, 18, 64, 60, 6, 4422
Offset: 2

Views

Author

Scott R. Shannon, Apr 10 2020

Keywords

Comments

As in A063427, if n is a prime then a(n^k) = (n-1)*n^k for k>=1. This sequence also matches A063427 for numerous other nonprime terms for small values of n.
For n below 10000 the values where n = a(n), other than n being a power of 2, are n = 14, 62, 122, 254, 508, 1018, 2038, 2042, 8182, 8186.

Examples

			a(2) = 2 as 2 ^ 2 = 4 is divisible by 2 + 2 = 4.
a(3) = 6 as 3 ^ 6 = 729 is divisible by 3 + 6 = 9.
a(4) = 4 as 4 ^ 4 = 256 is divisible by 4 + 4 = 8.
a(5) = 20 as 5 ^ 20 = 95367431640625 is divisible by 5 + 20 = 25.
		

Crossrefs

Programs

  • Mathematica
    spi[n_]:=Module[{k=1},While[PowerMod[n,k,n+k]!=0,k++];k]; Array[spi,70,2] (* Harvey P. Dale, Jan 16 2022 *)

A235268 Least integer k > n such that n*k/(n+k) is an integer, or 0 if no such k exists.

Original entry on oeis.org

1, 0, 0, 6, 12, 20, 12, 42, 24, 18, 15, 110, 24, 156, 35, 30, 48, 272, 36, 342, 30, 28, 99, 506, 40, 100, 143, 54, 70, 812, 45, 930, 96, 66, 255, 140, 45, 1332, 323, 78, 60, 1640, 56, 1806, 77, 90, 483, 2162, 80, 294, 75, 102, 117, 2756, 108, 66, 140, 114, 783
Offset: 0

Views

Author

Alex Ratushnyak, Jan 05 2014

Keywords

Examples

			a(3) = 6 because 6 is the smallest k > 3 such that k*3/(k+3) is an integer.
		

Crossrefs

Cf. A063427.

Programs

  • Mathematica
    a[0]=1; a[n_] := Block[{k,s,x}, s = Reduce[k*n/(k+n) == x && k>n, {k,x}, Integers]; If[s === False, 0, Min[k /. List@ ToRules@s]]]; a/@Range[0,100] (* Giovanni Resta, Jan 20 2014 *)
  • PARI
    a(n)=my(k=n+1);while((n*k)%(n+k)!=0,k=k+1);k \\ Ralf Stephan, Jan 15 2014

Formula

For prime p, a(p) = p*(p-1) = A002378(p-1). - Ralf Stephan, Jan 15 2014

A252669 a(n) is the smallest integer k such that n*k mod (n+k) = 1, or -1 if no such k exists.

Original entry on oeis.org

1, 3, 2, 13, 8, 31, 3, 5, 32, 91, 50, 17, 4, 183, 98, 241, 12, 7, 162, 381, 5, 75, 30, 553, 288, 651, 46, 129, 392, 23, 6, 9, 76, 55, 578, 1261, 100, 47, 722, 1561, 17, 311, 7, 105, 968, 27, 18, 413, 1152, 11, 1250, 489, 228, 2863, 34, 3081, 8, 615, 1682, 217, 1800, 707
Offset: 1

Views

Author

Alex Ratushnyak, Jan 02 2015

Keywords

Crossrefs

Cf. A063427.

Programs

  • Mathematica
    sik[n_]:=Module[{k=1},While[Mod[n*k,n+k]!=1,k++];k]; Array[sik,70] (* Harvey P. Dale, Aug 15 2015 *)
  • PARI
    a(n) = k=1; while ((n*k) % (n+k) != 1, k++); k; \\ Michel Marcus, Jan 08 2015
  • Python
    import math
    for n in range(1,333):
        res=-1
        for k in range(2**31-1):
            if ((n*k) % (n+k) == 1):
                res=k
                break
        print(res, end=', ')
    

Formula

a(a(n)) <= n.
Previous Showing 11-13 of 13 results.