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

A213637 Values of n for which A213636(n) = 1.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 27, 28, 29, 31, 33, 34, 35, 36, 37, 39, 40, 41, 43, 45, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 67, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 85, 87, 88, 89, 91, 93, 94, 95, 96, 97, 99
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2012

Keywords

Comments

a(n) is the position of the n-th 1 in the sequence of remainders when each positive integer is divided by its least nondivisor (as in A007978).

Programs

  • Mathematica
    (See A213636.)
    rem[n_]:=Module[{lnd=First[Complement[Range[n],Divisors[n]]]},Mod[n,lnd]];Flatten[Position[Join[{1,2},Array[rem,100,3]],1]] (* Harvey P. Dale, Feb 07 2014 *)

A213638 Positions of 2 in A213636.

Original entry on oeis.org

2, 6, 8, 12, 14, 18, 20, 26, 30, 32, 38, 42, 44, 50, 54, 56, 62, 66, 68, 72, 74, 78, 80, 86, 90, 92, 98, 102, 104, 110, 114, 116, 122, 126, 128, 132, 134, 138, 140, 146, 150, 152, 158, 162, 164, 170, 174, 176, 182, 186, 188, 192, 194, 198, 200, 206, 210
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2012

Keywords

Comments

(See A213636.)

Crossrefs

Programs

A326778 a(n) is the least k such that A213636(k) = n.

Original entry on oeis.org

1, 2, 48, 24, 180, 300, 17640, 20160, 22680, 25200, 166320, 83160, 4324320, 9369360, 2162160, 7207200, 98017920, 49008960, 2793510720, 2095133040, 1396755360, 698377680, 1847208963600, 1927522396800, 2007835830000, 2088149263200, 2168462696400, 2248776129600
Offset: 1

Views

Author

Rémy Sigrist, Jul 29 2019

Keywords

Crossrefs

Programs

  • PARI
    A213636(n) = for (d=2, oo, if (n%d, return (n%d)))
    a(n) = my (l=lcm([1..n])); forstep (x=l, oo, l, if (A213636(x)==n, return (x/l)))

Formula

a(n) is a multiple if A003418(n).
a(n) mod p = n where p is the least prime number > n.

A213633 [A000027/A007978], where [ ] = floor.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 2, 6, 4, 7, 5, 8, 4, 9, 6, 10, 7, 11, 4, 12, 8, 13, 9, 14, 7, 15, 10, 16, 11, 17, 7, 18, 12, 19, 13, 20, 10, 21, 14, 22, 15, 23, 9, 24, 16, 25, 17, 26, 13, 27, 18, 28, 19, 29, 8, 30, 20, 31, 21, 32, 16, 33, 22, 34, 23, 35, 14, 36, 24, 37
Offset: 1

Views

Author

Clark Kimberling, Jun 16 2012

Keywords

Comments

a(n) = floor(n/m), where m is the least positive nondivisor of n, as in A007978.

Examples

			a(10) = floor(10/3) = 3.
		

Crossrefs

Programs

  • Mathematica
    y=120; z=2000;
    t = Table[k := 1; While[Mod[n, k] == 0, k++]; k, {n, 1, z}]  (* A007978 *)
    Table[Floor[n/t[[n]]], {n, 1, y}] (* A213633 *)
    Table[n - Floor[n/t[[n]]], {n, 1, y}] (* A213634 *)
    Table[t[[n]]*Floor[n/t[[n]]], {n, 1, y}] (* A213635 *)
    t1 = Table[n - t[[n]]*Floor[n/t[[n]]], {n, 1, z}] (* A213636 *)
    Flatten[Position[t1, 1]] (* A213637 *)
    Flatten[Position[t1, 2]] (* A213638 *)

A374381 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) = (n mod m) - (k mod m) where m = A007978(n-k).

Original entry on oeis.org

1, 2, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 2, 1, 2, -1, -2, -1, -1, -1, 1, 2, 1, 1, 1, -1, 1, 2, -1, -2, -1, 1, -1, 2, -1, 1, -1, 1, -2, 1, -2, 1, -1, 1, 1, -1, -1, -1, 2, -1, 1, -1, -1, -1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1
Offset: 1

Views

Author

Rémy Sigrist, Jul 07 2024

Keywords

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ---------------------------------------------
   1  1
   2  2, -1
   3  1, -1, 1
   4  1, -1, -1, -1
   5  1, 1, 1, 2, 1
   6  2, -1, -2, -1, -1, -1
   7  1, 2, 1, 1, 1, -1, 1
   8  2, -1, -2, -1, 1, -1, 2, -1
   9  1, -1, 1, -2, 1, -2, 1, -1, 1
  10  1, -1, -1, -1, 2, -1, 1, -1, -1, -1
  11  1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1
  12  2, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1
		

Crossrefs

Programs

  • PARI
    T(n, k) = { for (m = 2, oo, my (d = (n%m) - (k%m)); if (d, return (d););); }

Formula

T(n, 0) = A213636(n).
T(n, n-1) = (-1)^(n-1).

A360825 a(n) is the remainder after dividing n! by its least nondivisor.

Original entry on oeis.org

1, 1, 2, 2, 4, 1, 6, 2, 5, 1, 10, 1, 12, 3, 8, 1, 16, 1, 18, 4, 11, 1, 22, 22, 6, 5, 14, 1, 28, 1, 30, 33, 20, 31, 18, 1, 36, 7, 20, 1, 40, 1, 42, 8, 23, 1, 46, 19, 11, 9, 26, 1, 52, 30, 27, 10, 29, 1, 58, 1, 60, 43, 53, 56, 33, 1, 66, 12, 35, 1, 70, 1, 72, 27, 23
Offset: 0

Views

Author

Sebastian F. Orellana, Feb 22 2023

Keywords

Comments

For every term besides a(3), the least nondivisor is the next prime after n.

Examples

			a(5) = 5! mod 7 = 120 mod 7 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{f = n!, m = n + 1}, While[Divisible[f, m], m++]; Mod[f, m]]; Array[a, 100, 0] (* Amiram Eldar, Feb 22 2023 *)
  • PARI
    a(n) = my(k=1, r); while(!(r=(n! % (n+k))), k++); r; \\ Michel Marcus, Feb 22 2023
    
  • Python
    from functools import reduce
    from sympy import nextprime
    def A360825(n):
        if n == 3: return 2
        m = nextprime(n)
        return reduce(lambda i, j: i*j%m,range(2,n+1),1)%m # Chai Wah Wu, Feb 22 2023
    
  • Python
    from functools import reduce
    from sympy import nextprime
    def A360825(n):
        if n == 3: return 2
        m = nextprime(n)
        return (m-1)*pow(reduce(lambda i,j:i*j%m,range(n+1,m),1),-1,m)%m # Chai Wah Wu, Feb 23 2023

Formula

a(n) = 1 <=> n in { A040976 } \ { 3 }.
a(n) = n <=> n in { A006093 }.
a(n) = n! mod A151800(n) for n > 3.
a(n) = A213636(n!) = A213636(A000142(n)).
a(A000040(n)) = A275111(n) for n >= 3.
a(n) > n <=> n in { A360805 }.
Showing 1-6 of 6 results.