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

A125718 a(1)=1. a(n) = the smallest positive integer not occurring earlier in the sequence such that the n-th prime is congruent to a(n) (mod n).

Original entry on oeis.org

1, 3, 2, 7, 6, 13, 10, 11, 5, 9, 20, 25, 15, 29, 17, 21, 8, 43, 48, 31, 52, 35, 14, 41, 22, 23, 49, 51, 80, 53, 34, 67, 38, 37, 44, 79, 46, 87, 50, 93, 56, 55, 19, 61, 62, 107, 70, 127, 129, 179, 131, 83, 82, 89, 92, 39, 98, 97, 100, 101, 161, 45, 118, 119, 183, 185, 63, 65
Offset: 1

Views

Author

Leroy Quet, Feb 01 2007

Keywords

Comments

This sequence seems likely to be a permutation of the positive integers. It will be if every positive number appears in A004648 (cf. A127149, A127150).
If this is a permutation of the positive integers, then A249678 is the inverse permutation. - M. F. Hasler, Nov 03 2014

Crossrefs

Cf. A004648.

Programs

  • Mathematica
    f[l_List] := Block[{n = Length[l] + 1, k = Mod[Prime[n], n, 1]},While[MemberQ[l, k], k += n];Append[l, k]];Nest[f, {1}, 70] (* Ray Chandler, Feb 04 2007 *)
  • PARI
    {Quet_p3(n)= /* Permutation sequence a'la Leroy Quet, A125718 */local(x=[1],k=0,w=1); for(i=2,n,if((k=prime(i)%i)==0,k=i);while(bittest(w,k-1)>0,k+=i);x=concat(x,k);w+=2^(k-1));return(x)}
    
  • PARI
    A125718(n,show=0,u=1)={for(n=1,n,p=prime(n)%n;while(bittest(u,p),p+=n);u+=1<M. F. Hasler, Nov 03 2014

Extensions

Extended by Ray Chandler, Feb 04 2007

A370981 Triangle T(n, k), n >= 0, k = 0..n, read and filled in the greedy way by rows with distinct nonnegative integers, such that for any n > 0 and any k in 0..n, T(n, k) is congruent modulo n to T(n-1, k-1) (provided that k > 0) or to T(n-1, k) (provided that k < n).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 9, 7, 10, 12, 5, 11, 14, 8, 16, 15, 20, 19, 13, 18, 21, 27, 26, 25, 31, 24, 30, 33, 34, 40, 32, 17, 38, 23, 37, 47, 42, 48, 56, 41, 22, 39, 29, 45, 55, 51, 57, 65, 50, 49, 58, 66, 36, 28, 46, 61, 67, 35, 60, 59, 68, 76, 86, 78, 88, 96
Offset: 0

Views

Author

Rémy Sigrist, Mar 06 2024

Keywords

Comments

This sequence can be seen as a two-dimensional variant of A125717.
Will every integer appear in the sequence?

Examples

			Triangle T(n, k) begins:
                         0
                       1   2
                     3   4   6
                   9   7  10  12
                 5  11  14   8  16
              15  20  19  13  18  21
            27  26  25  31  24  30  33
          34  40  32  17  38  23  37  47
        42  48  56  41  22  39  29  45  55
      51  57  65  50  49  58  66  36  28  46
    61  67  35  60  59  68  76  86  78  88  96
  72  83  79  71  70  81  43  53  64  44  52  63
		

Crossrefs

Cf. A125717.

Programs

  • PARI
    See Links section.
Previous Showing 11-12 of 12 results.