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

A023745 Plaindromes: numbers whose digits in base 3 are in nondecreasing order.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 13, 14, 17, 26, 40, 41, 44, 53, 80, 121, 122, 125, 134, 161, 242, 364, 365, 368, 377, 404, 485, 728, 1093, 1094, 1097, 1106, 1133, 1214, 1457, 2186, 3280, 3281, 3284, 3293, 3320, 3401, 3644, 4373, 6560, 9841, 9842, 9845, 9854
Offset: 1

Views

Author

Keywords

Examples

			In base 3 these numbers are 0, 1, 2, 11, 12, 22, 111, 112, 122, 222, 1111, 1112, ... [corrected by _Sean A. Irvine_, Jun 10 2019]
		

Crossrefs

Cf. A023746 onwards. In base 2 we get A000225.

Programs

  • Mathematica
    Select[Range[0,10000],!Negative[Min[Differences[IntegerDigits[ #,3]]]]&] (* or *) With[{nn=10},FromDigits[#,3]&/@Union[Flatten[Table[ PadRight[ PadLeft[{},n,1],x,2],{n,0,nn},{x,0,nn}],1]]] (* Harvey P. Dale, Oct 12 2011 *)
    Select[Range[0,10000],LessEqual@@IntegerDigits[#,3]&] (* Ray Chandler, Jan 06 2014 *)
  • Python
    from math import isqrt
    def A023745(n): return (3**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+3**(n-1-(a*(a+1)>>1))>>1)-1 # Chai Wah Wu, Apr 08 2025

Formula

Numbers that in ternary are the concatenation of i 1's with j 2's, i, j>=0. Also a(n) = A073216(n+1) - 1. Proof: Write a(n) as 1{m}2{n}, then adding 1 gives 1{m-1}20{n} for m>0 and 10{n} for m=0. Doubling yields 10{m-1}10{n} or 20{n}, respectively. These two forms exactly describe the forms of sums of two powers of 3, the two powers being 3^n and 3^(m+n). - Hugo van der Sanden

Extensions

Change offset to 1 by Ray Chandler, Jan 06 2014

A089644 Numbers k such that 7 divides the numerator of B(2*k) where B(k) = the k-th Bernoulli number.

Original entry on oeis.org

7, 14, 28, 35, 49, 56, 70, 77, 91, 98, 112, 119, 133, 140, 154, 161, 175, 182, 196, 203, 217, 224, 238, 245, 259, 266, 280, 287, 301, 308, 322, 329, 343, 350, 364, 371, 385, 392, 406, 413, 427, 434, 448, 455, 469, 476, 490, 497, 511, 518, 532, 539, 553, 560
Offset: 1

Views

Author

Benoit Cloitre, Jan 01 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[500], Divisible[Numerator @ BernoulliB[2*#], 7] &] (* Amiram Eldar, May 17 2021 *)
  • PARI
    isok(n) = ! ((numerator(bernfrac(2*n))) % 7); \\ Michel Marcus, Dec 06 2013

Formula

a(n) = 7*A001651(n).
a(n) = 21*(n-1)-a(n-1), with n>1, a(1)=7. - Vincenzo Librandi, Nov 16 2010
Showing 1-2 of 2 results.