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.

A249279 Inverse permutation of A249278 (such that first digit of a(n+1) has parity of a(n)).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Oct 24 2014

Keywords

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a249279 = fromJust . (`elemIndex` a249278_list)
    -- Reinhard Zumkeller, Oct 27 2014
  • PARI
    N=100;vector(N,n,t=0;for(i=1,#A249278,A249278[i]==n-1&&(t=i)&&break);t-1)
    

A249494 Lexicographically earliest permutation of the positive integers such that the parity of the first digit of a(n+1) equals that of a(n)'s last digit.

Original entry on oeis.org

1, 3, 5, 7, 9, 10, 2, 4, 6, 8, 20, 21, 11, 12, 22, 23, 13, 14, 24, 25, 15, 16, 26, 27, 17, 18, 28, 29, 19, 30, 40, 41, 31, 32, 42, 43, 33, 34, 44, 45, 35, 36, 46, 47, 37, 38, 48, 49, 39, 50, 60, 61, 51, 52, 62, 63, 53, 54, 64, 65, 55, 56, 66, 67, 57, 58, 68, 69, 59, 70, 80, 81, 71, 72, 82, 83, 73, 74, 84, 85, 75, 76, 86, 87, 77, 78, 88, 89, 79, 90, 200
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2014

Keywords

Comments

See A249506 for the inverse permutation.
See A249278 (and inverse A249279) for the variant based on nonnegative integers. A162501 is a variant based not on parity but on equality.

Crossrefs

Cf. A249506 (inverse permutation), A249278 (variant starting with 0), A249279 (inverse thereof), A162501 (variant based on equality of digits).
Cf. A000030 (initial digit), A010879 (final digit of n).

Programs

  • PARI
    a(n,a=1,u=0)=for(n=1,n,for(k=1,9e9, !bittest(u,k)&& k\10^(#Str(k)-1)==Mod(a,2)&& !print1(a=k",")&& break);u+=1<
    				

A249506 Inverse permutation to A249494 (= permutation of the positive integers such that the parity of the first digit of a(n+1) equals that of a(n)'s last digit).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Oct 30 2014

Keywords

Comments

See A249278 and A249279 for the variant based on nonnegative integers; A162501 is a variant based not on parity but on equality.

Crossrefs

Programs

  • PARI
    a=vector(#A249494);for(i=1,#a,A249494[i]<=#a&&a[A249494[i]]=i);a \\ Result only valid up to the first zero.
Showing 1-3 of 3 results.