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

A126571 Triangle where the m-th term in row n is the n-th integer from among those positive integers coprime to m.

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 4, 7, 5, 7, 5, 9, 7, 9, 6, 6, 11, 8, 11, 7, 17, 7, 13, 10, 13, 8, 19, 8, 8, 15, 11, 15, 9, 23, 9, 15, 9, 17, 13, 17, 11, 25, 10, 17, 13, 10, 19, 14, 19, 12, 29, 11, 19, 14, 23, 11, 21, 16, 21, 13, 31, 12, 21, 16, 27, 12, 12, 23, 17, 23, 14, 35, 13, 23, 17, 29, 13, 35
Offset: 1

Views

Author

Leroy Quet, Dec 28 2006

Keywords

Examples

			The fifth positive integer coprime to 1 is 5. The fifth positive integer coprime to 2 is 9. The fifth positive integer coprime to 3 is 7. The fifth positive integer coprime to 4 is 9. And the fifth positive integer coprime to 5 is 6. So row 5 of the triangle is (5,9,7,9,6).
From _Michael De Vlieger_, Aug 21 2017: (Start)
Triangle begins:
   1
   2    3
   3    5    4
   4    7    5    7
   5    9    7    9    6
   6   11    8   11    7   17
   7   13   10   13    8   19    8
   8   15   11   15    9   23    9   15
   9   17   13   17   11   25   10   17   13
  10   19   14   19   12   29   11   19   14   23
  11   21   16   21   13   31   12   21   16   27   12
  12   23   17   23   14   35   13   23   17   29   13   35
(End)
		

Crossrefs

Programs

  • Mathematica
    f[m_, n_] := Block[{k = 0, c = n},While[c > 0,k++;While[GCD[k, m] > 1, k++ ];c--;];k];Flatten@Table[f[m, n], {n, 12}, {m, n}] (* Ray Chandler, Dec 29 2006 *)

Extensions

Extended by Ray Chandler, Dec 29 2006

A132273 a(n) = Sum{k=1..n} (k-th integer from among those positive integers that are coprime to (n+1-k)).

Original entry on oeis.org

1, 3, 7, 12, 20, 28, 41, 52, 69, 83, 103, 122, 149, 169, 197, 222, 257, 285, 322, 355, 397, 431, 477, 514, 567, 610, 662, 708, 769, 815, 882, 935, 1000, 1056, 1123, 1182, 1267, 1326, 1404, 1471, 1554, 1628, 1712, 1790, 1882, 1958, 2057, 2137, 2240
Offset: 1

Views

Author

Leroy Quet, Aug 16 2007

Keywords

Comments

a(n) is the sum of the terms in the n-th antidiagonal of the A126572 array. - Michel Marcus, Mar 14 2018

Examples

			The integers coprime to 1 are 1,2,3,4,5,6,... The 5th of these is 5. The integers coprime to 2 are 1,3,5,7,9,... The 4th of these is 7. The integers coprime to 3 are 1,2,4,5,7,... The 3rd of these is 4. The integers coprime to 4 are 1,3,5,... The 2nd of these is 3. And the integers coprime to 5 are 1,2,3,4,6,... The first of these is 1. So a(5) = 5 + 7 + 4 + 3 + 1 = 20.
		

Crossrefs

Programs

  • Haskell
    a132273 n = sum $ zipWith (!!) coprimess (reverse [0..n-1]) where
       coprimess = map (\x -> filter ((== 1) . (gcd x)) [1..]) [1..]
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Mathematica
    a = {}; For[n = 1, n < 50, n++, s = 0; For[k = 1, k < n + 1, k++, c = 0; i = 1; While[c < k, If[GCD[i, n + 1 - k] == 1, c++ ]; i++ ]; s = s + i - 1]; AppendTo[a, s]]; a (* Stefan Steinerberger, Nov 01 2007 *)
  • PARI
    cop(k, j) = {my(nbc = 0, i = 0); while (nbc != j, i++; if (gcd(i,k)==1, nbc++)); i;}
    a(n) = vecsum(vector(n, k, cop(k, n-k+1))); \\ Michel Marcus, Mar 14 2018

Extensions

More terms from Stefan Steinerberger, Nov 01 2007

A132274 a(1)=1; a(n+1) = Sum_{k=1..n} (k-th integer from among those positive integers which are coprime to a(n+1-k)).

Original entry on oeis.org

1, 1, 3, 6, 10, 19, 27, 41, 51, 66, 78, 101, 119, 145, 167, 197, 219, 247, 272, 306, 335, 371, 403, 443, 477, 521, 559, 609, 647, 693, 737, 789, 834, 886, 940, 996, 1055, 1118, 1176, 1243, 1306, 1385, 1450, 1523, 1596, 1676, 1749, 1844, 1914, 2010, 2092, 2188
Offset: 1

Views

Author

Leroy Quet, Aug 16 2007

Keywords

Examples

			The integers coprime to a(1)=1 are 1,2,3,4,5,6,... The 5th of these is 5. The integers coprime to a(2)=1 are 1,2,3,4,5... The 4th of these is 4. The integers coprime to a(3)=3 are 1,2,4,5,7,... The 3rd of these is 4. The integers coprime to a(4)=6 are 1,5,7,11,... The 2nd of these is 5. And the integers coprime to a(5)=10 are 1,3,7,9,11,... The first of these is 1. So a(6) = 5 + 4 + 4 + 5 + 1 = 19.
		

Crossrefs

Programs

  • Maple
    A132274 := proc(n) option remember; local a,k,an1k,kcoud,c ; if n = 1 then 1; else a :=0 ; for k from 1 to n-1 do an1k := procname(n-k) ; kcoud := 0 ; for c from 1 do if gcd(c,an1k) = 1 then kcoud := kcoud+1 ; fi; if kcoud = k then a := a+c ; break; fi; od: od: a; fi; end: seq(A132274(n),n=1..60) ; # R. J. Mathar, Jul 20 2009
  • Mathematica
    A132274[n_] := A132274[n] = Module[{a, k, an1k, kcoud, c}, If[n == 1, 1, a = 0; For[k = 1, k <= n-1, k++, an1k = A132274[n-k]; kcoud = 0; For[c = 1, True, c++, If[GCD[c, an1k] == 1, kcoud++]; If[kcoud == k, a = a+c; Break[]]]]; a]];
    Table[A132274[n], {n, 1, 60}] (* Jean-François Alcover, Jan 28 2024, after R. J. Mathar *)

Extensions

Extended beyond a(8) by R. J. Mathar, Jul 20 2009

A132275 a(1)=1. a(n+1) = sum{k=1 to n} (a(k)th integer from among those positive integers which are coprime to a(n+1-k)).

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 37, 81, 177, 387, 847, 1856, 4066, 8910, 19524, 42783, 93760, 205475, 450282, 986770, 2162473, 4738974, 10385267, 22758885, 49875175, 109299427, 239525260, 524909877, 1150318695, 2520876742, 5524399079, 12106496388, 26530895539, 58141380910
Offset: 1

Views

Author

Leroy Quet, Aug 16 2007

Keywords

Examples

			To compute a(5) we add the first integer coprime to a(4), the first integer coprime to a(3), the 2nd integer coprime to a(2) and the 4th integer coprime to a(1), which is the first integer in {1,3,4,5,..}, the first integer in {1,2,3,4,...}, the 2nd integer in {1,2,3,4,...} and the 4th integer in {1,2,3,4,..} = 1+1+2+4=8.
		

Crossrefs

Programs

  • Maple
    A132275 := proc(n) option remember; local a,k,an1k,kcoud,c ; if n = 1 then 1; else a :=0 ; for k from 1 to n-1 do an1k := procname(n-k) ; kcoud := 0 ; for c from 1 do if gcd(c,an1k) = 1 then kcoud := kcoud+1 ; fi; if kcoud = procname(k) then a := a+c ; break; fi; od: od: a; fi; end:
    seq(A132275(n),n=1..18) ; # R. J. Mathar, Jul 20 2009
    with(numtheory): fc:= proc(t,p) option remember; local m, j, h, pp; if p=1 then t else pp:= phi(p); m:= iquo(t,pp); j:= m*pp; h:= m*p-1; while jAlois P. Heinz, Aug 05 2009
  • Mathematica
    fc[t_, p_] := fc[t, p] = Module[{m, j, h, pp}, If[p==1, t, pp = EulerPhi[p]; m = Quotient[t, pp]; j = m*pp; h = m*p-1; While[jJean-François Alcover, Mar 21 2017, after Alois P. Heinz *)

Extensions

Corrected from a(5) on by R. J. Mathar, Jul 21 2009
Extended beyond a(19) Alois P. Heinz, Aug 05 2009

A295653 Square array T(n, k), n >= 0, k >= 0, read by antidiagonals upwards: T(n, k) = the (k+1)-th nonnegative number m such that n AND m = 0 (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 0, 1, 4, 3, 0, 4, 4, 6, 4, 0, 1, 8, 5, 8, 5, 0, 2, 2, 12, 8, 10, 6, 0, 1, 8, 3, 16, 9, 12, 7, 0, 8, 8, 10, 8, 20, 12, 14, 8, 0, 1, 16, 9, 16, 9, 24, 13, 16, 9, 0, 2, 2, 24, 16, 18, 10, 28, 16, 18, 10, 0, 1, 4, 3, 32, 17, 24, 11, 32, 17, 20
Offset: 0

Views

Author

Rémy Sigrist, Nov 25 2017

Keywords

Comments

This sequence has similarities with A126572: here we check for common bits in binary representations, there for common primes in prime factorizations.
For any n >= 0 and k >= 0:
- T(0, k) = k,
- T(1, k) = 2*k,
- T(2, k) = A042948(k),
- T(3, k) = 4*k,
- T(4, k) = A047476(k),
- T(5, k) = A047467(k),
- T(2^n - 1, k) = 2^n * k,
- T(n, 0) = 0,
- T(n, 1) = A006519(n+1),
- T(n, k + 2^A080791(n)) = T(n, k) + 2^A029837(n+1) (i.e. each row is linear),
- A000120(T(n, k)) = A000120(k).

Examples

			Square array begins:
n\k  0   1   2   3   4   5   6   7   8   9  ...
0:   0   1   2   3   4   5   6   7   8   9  ...
1:   0   2   4   6   8  10  12  14  16  18  ...
2:   0   1   4   5   8   9  12  13  16  17  ...
3:   0   4   8  12  16  20  24  28  32  36  ...
4:   0   1   2   3   8   9  10  11  16  17  ...
5:   0   2   8  10  16  18  24  26  32  34  ...
6:   0   1   8   9  16  17  24  25  32  33  ...
7:   0   8  16  24  32  40  48  56  64  72  ...
8:   0   1   2   3   4   5   6   7  16  17  ...
9:   0   2   4   6  16  18  20  22  32  34  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = if (n==0, k, n%2, 2*T(n\2,k), 2*T(n\2,k\2) + (k%2))

Formula

For any n >= 0 and k >= 0:
- T(0, k) = k,
- T(2*n + 1, k) = 2*T(n, k),
- T(2*n, 2*k) = 2*T(n, k),
- T(2*n, 2*k + 1) = 2*T(n, k) + 1.
For any n >= 0, T(n, k) ~ 2^A000120(n) * k as k tends to infinity.

A130767 a(n) = product{k=1 to n} (k-th integer from among those positive integers which are coprime to (n+1-k)).

Original entry on oeis.org

1, 2, 9, 40, 420, 2700, 56595, 419328, 8820900, 88488400, 2327925600, 38767286880, 1912404574080, 21612951360000, 644047087612500, 10985391056640000, 634391869996684800, 14046187624838328960, 764077915447610400000, 15840110879873280000000, 755098009918296312668400
Offset: 1

Views

Author

Leroy Quet, Aug 18 2007

Keywords

Comments

a(n) is the product of the terms in the n-th antidiagonal of the A126572 array. - Michel Marcus, Mar 14 2018

Examples

			The integers coprime to 1 are: 1,2,3,4,5,6,... The 5th of these is 5. The integers coprime to 2 are: 1,3,5,7,9,... The 4th of these is 7. The integers coprime to 3 are: 1,2,4,5,7,... The 3rd of these is 4. The integers coprime to 4 are: 1,3,5,... The 2nd of these is 3. And the integers coprime to 5 are: 1,2,3,4,6,... The first of these is 1. So a(5) = 5 * 7 * 4 * 3 * 1 = 420.
		

Crossrefs

Programs

  • PARI
    cop(k, j) = {my(nbc = 0, i = 0); while (nbc != j, i++; if (gcd(i,k)==1, nbc++)); i;}
    a(n) = {my(vc = vector(n, k, cop(k, n-k+1))); prod(k=1, n, vc[k]);} \\ Michel Marcus, Mar 14 2018

Extensions

More terms from Michel Marcus, Mar 14 2018

A132009 a(1) = 1; for n>=2, a(n) = n-th positive integer which is coprime to the largest prime divisor of n.

Original entry on oeis.org

1, 3, 4, 7, 6, 8, 8, 15, 13, 12, 12, 17, 14, 16, 18, 31, 18, 26, 20, 24, 24, 24, 24, 35, 31, 28, 40, 32, 30, 37, 32, 63, 36, 36, 40, 53, 38, 40, 42, 49, 42, 48, 44, 48, 56, 48, 48, 71, 57, 62, 54, 56, 54, 80, 60, 65, 60, 60, 60, 74, 62, 64, 73, 127, 70, 72, 68, 72, 72, 81, 72, 107
Offset: 1

Views

Author

Leroy Quet, Oct 29 2007

Keywords

Examples

			The largest prime dividing 12 is 3. The positive integers which are coprime to 3 are 1,2,4,5,7,8,10,11,13,14,16,17,19,20,... The 12th of these is 17, so a(12) = 17.
		

Programs

  • Maple
    A126572 := proc(n,k) local f,i ; f := 1 ; for i from 1 do if gcd(i,n) = 1 then if f = k then RETURN(i) ; fi ; f := f+1 ; fi ; od: end: A006530 := proc(n) if n = 1 then 1; else max(seq(op(1,i),i=ifactors(n)[2]) ) ; fi ; end: A132009 := proc(n) local p ; p := A006530(n) ; A126572(p,n) ; end: seq(A132009(n),n=1..100) ; # R. J. Mathar, Nov 09 2007
  • Mathematica
    a = {1}; For[n = 2, n < 70, n++, b = FactorInteger[n][[ -1, 1]]; c = 0; i = 1; While[c < n, If[GCD[i, b] == 1, c++ ]; i++ ]; AppendTo[a, i - 1]]; a (* Stefan Steinerberger, Nov 04 2007 *)

Formula

a(n)=A126572(A006530(n),n). - R. J. Mathar, Nov 09 2007

Extensions

More terms from Stefan Steinerberger and R. J. Mathar, Nov 04 2007

A132421 a(n) = LCM of the integers b(k), over all k where 1 <= k <= n, where b(k) = the k-th integer from among those positive integers which are coprime to (n+1-k).

Original entry on oeis.org

1, 2, 3, 20, 420, 90, 1155, 6552, 990, 340340, 38798760, 406980, 314954640, 30630600, 489304530, 18357939600, 21649708080, 2872543794120, 181957885200, 5555594444400, 237972194460, 32681613985020, 378270916143120, 892567605600, 392636231914726800, 1707200400597892200, 1079806447472472720, 4176841288170450900
Offset: 1

Views

Author

Leroy Quet, Aug 20 2007

Keywords

Comments

a(n) is the LCM of the terms in the n-th antidiagonal of the A126572 array. - Michel Marcus, Mar 14 2018

Examples

			The integers coprime to 4 are 1,3,5,... The first of these is 1. The integers coprime to 3 are 1,2,4,5,... The 2nd of these is 2. The integers coprime to 2 are 1,3,5,7,9,... The 3rd of these is 5. And the integers coprime to 1 are 1,2,3,4,5,... The 4th of these is 4. So a(5) = lcm(1,2,5,4) = 20.
		

Crossrefs

Programs

  • PARI
    cop(k, j) = {my(nbc = 0, i = 0); while (nbc != j, i++; if (gcd(i,k)==1, nbc++)); i;}
    a(n) = lcm(vector(n, k, cop(k, n-k+1))); \\ Michel Marcus, Mar 14 2018

Extensions

More terms from Sean A. Irvine, Nov 25 2010

A135324 a(n) = Sum_{k=1..phi(n)} k*t(k), where t(k) is the k-th positive integer which is coprime to n and phi(n) is the number of positive integers which are <= n and are coprime to n.

Original entry on oeis.org

1, 1, 5, 7, 30, 11, 91, 50, 120, 64, 385, 76, 650, 191, 354, 372, 1496, 243, 2109, 468, 1081, 795, 3795, 560, 3450, 1336, 3033, 1432, 7714, 692, 9455, 2856, 4595, 3056, 6974, 1836, 16206, 4299, 7766, 3576, 22140, 2126, 25585, 6100, 8922, 7711, 33511
Offset: 1

Views

Author

Leroy Quet, Dec 06 2007

Keywords

Examples

			The positive integers that are coprime to 12 and are <= 12 are 1,5,7,11. So a(12) = 1*1 + 2*5 + 3*7 + 4*11 = 1+10+21+44 =76.
		

Programs

  • Maple
    A126572 := proc(n,k) local a,i ; a := 1 ; for i from 1 to k do if i = k then RETURN(a) ; fi ; a := a+1 ; while gcd(a,n) <> 1 do a := a+1 ; od; od: end: A135324 := proc(n) add( k*A126572(n,k),k=1..numtheory[phi](n)) ; end: for n from 1 to 80 do printf("%d, ",A135324(n) ) ; od: # R. J. Mathar, Jan 30 2008

Formula

a(n) = Sum_{k=1..A000010(n)} k*A126572(n,k). - R. J. Mathar, Jan 30 2008

Extensions

More terms from R. J. Mathar, Jan 30 2008

A160547 Numbers coprime to 31.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74
Offset: 1

Views

Author

Zerinvary Lajos, May 18 2009

Keywords

Crossrefs

Row 31 of A126572.
Complement of A135631.

Programs

  • Mathematica
    With[{nn=100},Complement[Range[nn],31*Range[Floor[nn/31]]]] (* Harvey P. Dale, Nov 29 2017 *)
  • Sage
    [i for i in range(0,100) if gcd(31, i) == 1]

Formula

a(n) = n+floor((n-1)/(p-1)) where p=31 in this case. - Roger M Ellingson, Nov 14 2023

Extensions

Name edited by Roger M Ellingson, Nov 14 2023
Showing 1-10 of 10 results.