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 31-40 of 52 results. Next

A356859 a(n) is the number of zero digits in the product of the first n numbers not divisible by 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 2, 1, 0, 1, 1, 1, 0, 2, 1, 0, 0, 2, 4, 1, 2, 2, 2, 6, 5, 2, 3, 5, 4, 2, 5, 3, 4, 6, 4, 3, 8, 3, 3, 4, 8, 9, 6, 3, 5, 9, 6, 10, 9, 7, 4, 11, 10, 10, 8, 13, 9, 5, 8, 8, 11, 7, 8, 10, 13, 11, 10, 12, 11, 13, 13, 16, 6, 16, 10, 21, 17
Offset: 0

Views

Author

Stefano Spezia, Sep 01 2022

Keywords

Crossrefs

Cf. A356860 (number of digits), A356861 (number of nonzero digits).

Programs

  • Mathematica
    Table[Count[IntegerDigits[Product[Floor[(5i-1)/4], {i,n}]], 0], {n,0,80}]
  • Python
    from math import prod
    def a(n): return str(prod((5*k-1)//4 for k in range(1, n+1))).count("0")
    print([a(n) for n in range(81)]) # Michael S. Branicky, Sep 01 2022

Formula

a(n) = A055641(A356858(n)).

A356861 a(n) is the number of nonzero digits in the product of the first n numbers not divisible by 5.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 3, 5, 6, 5, 8, 10, 10, 11, 12, 15, 14, 16, 19, 20, 20, 19, 23, 24, 25, 27, 24, 27, 31, 32, 32, 34, 38, 36, 40, 41, 40, 44, 47, 43, 50, 52, 53, 50, 51, 56, 61, 60, 58, 63, 61, 64, 67, 72, 67, 70, 72, 76, 72, 78, 84, 83, 85, 84, 90, 91, 91, 90
Offset: 0

Views

Author

Stefano Spezia, Sep 01 2022

Keywords

Crossrefs

Cf. A356859 (number of zero digits), A356860 (number of digits).

Programs

  • Mathematica
    Table[Length[Select[IntegerDigits[Product[Floor[(5i-1)/4], {i,n}]], Positive]], {n,0,68}]
  • Python
    from math import prod
    def a(n): s = str(prod((5*k-1)//4 for k in range(1, n+1))); return len(s) - s.count("0")
    print([a(n) for n in range(69)]) # Michael S. Branicky, Sep 01 2022

Formula

a(n) = A055640(A356858(n)).

A125704 Table read by antidiagonals: row n contains the positive integers (in order) which are coprime to the n-th prime.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jan 31 2007

Keywords

Examples

			Beginning of table:
  1,  3,  5,  7,  9, 11, 13, ...
  1,  2,  4,  5,  7,  8, 10, 11, ...
  1,  2,  3,  4,  6,  7,  8,  9, 11, ...
  1,  2,  3,  4,  5,  6,  8,  9, 10, ...
		

Programs

  • Maple
    A125704 := proc(n,m) local p,i,a ; p := ithprime(n) ; a := 1 ; for i from 2 to m do a := a+1 ; while gcd(a,p) <> 1 do a := a+1 ; od ; od ; RETURN(a) ; end : maxdiag := 15 ; for d from 1 to maxdiag do for n from d to 1 by -1 do printf("%d,",A125704(n,d-n+1)) ; od ; od; # R. J. Mathar, Feb 02 2007
  • Mathematica
    Table[Function[n, k - 1 + Floor[(k + Prime[n] - 2)/(Prime[n] - 1)]][m - k + 1], {m, 14}, {k, m}] // Flatten (* Michael De Vlieger, Oct 10 2017, after PARI by Benoit Cloitre *)
  • PARI
    T(n,m)=m-1+floor((m+prime(n)-2)/(prime(n)-1)) \\ Benoit Cloitre, Jul 11 2009

Formula

T(1,m) = A005408(m). T(2,m) = A001651(m). T(3,m) = A047201(m). T(4,m) = A047304(m). - R. J. Mathar, Feb 02 2007
T(n,m) = m - 1 + floor((m+prime(n)-2)/(prime(n)-1)) where prime(n) = n-th prime. - Benoit Cloitre, Jul 11 2009

Extensions

More terms from R. J. Mathar, Feb 02 2007

A174138 Numbers congruent to {5,6,7,8,9,15,16,17,18,19} mod 25.

Original entry on oeis.org

5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 55, 56, 57, 58, 59, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 90, 91, 92, 93, 94, 105, 106, 107, 108, 109, 115, 116, 117, 118, 119, 130, 131, 132, 133, 134, 140, 141, 142, 143, 144, 155, 156, 157
Offset: 1

Views

Author

Rick L. Shepherd, Mar 09 2010

Keywords

Comments

Numbers whose partition into parts of sizes 1, 5, 10, and 25 having a minimal number of parts includes a part of size 5.
For each number the partition is unique and exactly one part is of size 5.
Complement of A174139.
Amounts in cents requiring a nickel when the minimal number of coins is selected from pennies, nickels, dimes, and quarters (whether usage of bills for whole-dollar amounts is permitted or not).
For each n >= 0, floor(n/25) parts of size 25 (quarters) occur in the partition with minimal number of these parts (regardless of whether partition includes part of size 5).

Examples

			As 15 = 10 + 5, 15 is a term since 5 is included and all other candidate partitions have more than two parts. Similarly, as 30 = 25 + 5, 30 is a term. However, 45 = 25 + 10 + 10 is not a term as it contains no part of size 5.
		

Crossrefs

Cf. A174139, A174140, A174141, A047201 (requires at least one part of size 1 (penny)), A008587, A053344 (minimal number of parts), A001299 (number of all such partitions).

Programs

  • Magma
    [n : n in [1..200] | n mod 25 in [5, 6, 7, 8, 9, 15, 16, 17, 18, 19]]; // Vincenzo Librandi, Mar 22 2015
  • Mathematica
    Table[n + 9 + 5 Floor[(Floor[(n - 1)/5] - 1)/2] + 10 Floor[Floor[(n - 1)/5]/2], {n, 100}] (* Wesley Ivan Hurt, Mar 22 2015 *)

Formula

a(10+n) = a(n) + 25 for n >= 1.
a(n) = a(n-1) + a(n-10) - a(n-11). G.f.: x*(5+x+x^2+x^3+x^4+6*x^5+x^6+x^7+x^8+x^9+6*x^10) / ( (1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = n+9+5*floor((floor((n-1)/5)-1)/2)+10*floor(floor((n-1)/5)/2). - Wesley Ivan Hurt, Mar 22 2015

A174139 Numbers congruent to {0,1,2,3,4,10,11,12,13,14,20,21,22,23,24} mod 25.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 85, 86, 87, 88, 89, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 110, 111, 112
Offset: 1

Views

Author

Rick L. Shepherd, Mar 09 2010

Keywords

Comments

Numbers whose partition into parts of sizes 1, 5, 10, and 25 having a minimal number of parts does not include a part of size 5.
For each number the partition is unique.
Complement of A174138.
Amounts in cents not including a nickel when the minimal number of coins is selected from pennies, nickels, dimes, and quarters (whether usage of bills for whole-dollar amounts is permitted or not).
For each n >= 0, floor(n/25) parts of size 25 (quarters) occur in the partition with minimal number of these parts (regardless of whether partition includes part of size 5).
First differs from A032955 at n = 76. - Avi Mehra, Oct 08 2020

Crossrefs

Cf. A174138, A174140, A174141, A047201 (requires at least one part of size 1 (penny)), A008587, A053344 (minimal number of parts), A001299 (number of all such partitions).

Programs

  • Mathematica
    Select[Range[0, 112], Mod[Mod[#, 25], 10] < 5 &] (* Amiram Eldar, Oct 08 2020 *)
  • PARI
    { my(table=[0,1,2,3,4, 10,11,12,13,14, 20,21,22,23,24]);
    a(n) = my(r);[n,r]=divrem(n-1,15); 25*n + table[r+1]; } \\ Kevin Ryde, Oct 08 2020

Formula

a(15+n) = a(n) + 25 for n >= 1.
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = +a(n-1) +a(n-15) -a(n-16).
G.f.: x^2*(1 +x +x^2 +x^3 +6*x^4 +x^5 +x^6 +x^7 +x^8 +6*x^9 +x^10 +x^11 +x^12 +x^13+x^14) / ( (1+x+x^2) *(x^4+x^3+x^2+x+1) *(x^8-x^7+x^5-x^4+x^3-x+1) *(x-1)^2). (End)

A294116 Fibonacci sequence beginning 2, 21.

Original entry on oeis.org

2, 21, 23, 44, 67, 111, 178, 289, 467, 756, 1223, 1979, 3202, 5181, 8383, 13564, 21947, 35511, 57458, 92969, 150427, 243396, 393823, 637219, 1031042, 1668261, 2699303, 4367564, 7066867, 11434431, 18501298, 29935729, 48437027, 78372756, 126809783, 205182539, 331992322, 537174861
Offset: 0

Views

Author

Bruno Berselli, Oct 23 2017

Keywords

References

  • Steven Vajda, Fibonacci and Lucas Numbers, and the Golden Section: Theory and Applications, Dover Publications (2008), page 24 (formula 8).

Crossrefs

Subsequence of A047201, A047592, A113763.
Sequences of the type g(2,k;n): A118658 (k=0), A000032 (k=1), 2*A000045 (k=2,4), A020695 (k=3), A001060 (k=5), A022112 (k=6), A022113 (k=7), A294157 (k=8), A022114 (k=9), A022367 (k=10), A022115 (k=11), A022368 (k=12), A022116 (k=13), A022369 (k=14), A022117 (k=15), A022370 (k=16), A022118 (k=17), A022371 (k=18), A022119 (k=19), A022372 (k=20), this sequence (k=21), A022373 (k=22); A022374 (k=24); A022375 (k=26); A022376 (k=28), A190994 (k=29), A022377 (k=30); A022378 (k=32).

Programs

  • Magma
    a0:=2; a1:=21; [GeneralizedFibonacciNumber(a0, a1, n): n in [0..40]];
    
  • Mathematica
    LinearRecurrence[{1, 1}, {2, 21}, 40]
  • PARI
    Vec((2 + 19*x)/(1 - x - x^2) + O(x^40)) \\ Colin Barker, Oct 25 2017
    
  • Sage
    a = BinaryRecurrenceSequence(1, 1, 2, 21)
    print([a(n) for n in range(38)]) # Peter Luschny, Oct 25 2017

Formula

G.f.: (2 + 19*x)/(1 - x - x^2).
a(n) = a(n-1) + a(n-2).
Let g(r,s;n) be the n-th generalized Fibonacci number with initial values r, s. We have:
a(n) = Lucas(n) + g(0,20;n), see A022354;
a(n) = Fibonacci(n) + g(2,20;n), see A022372;
a(n) = 2*g(1,21;n) - g(0,21;n);
a(n) = g(1,k;n) + g(1,21-k;n) for all k in Z.
a(h+k) = a(h)*Fibonacci(k-1) + a(h+1)*Fibonacci(k) for all h, k in Z (see S. Vajda in References section). For h=0 and k=n:
a(n) = 2*Fibonacci(n-1) + 21*Fibonacci(n).
Sum_{j=0..n} a(j) = a(n+2) - 21.
a(n) = (2^(-n)*((1-sqrt(5))^n*(-20+sqrt(5)) + (1+sqrt(5))^n*(20+sqrt(5)))) / sqrt(5). - Colin Barker, Oct 25 2017

A330002 Beatty sequence for x, where 1/x + 1/(x+1)^2 = 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 74, 76, 77, 78, 79, 81, 82, 83
Offset: 1

Views

Author

Clark Kimberling, Jan 04 2020

Keywords

Comments

Let x be the solution of 1/x + 1/(x+1)^2 = 1. Then (floor(n x) and (floor(n (x+1)^2))) are a pair of Beatty sequences; i.e., every positive integer is in exactly one of the sequences. See the Guide to related sequences at A329825.
Differs from A047201 first at A047201(85)=106, a(85)=105. - R. J. Mathar, Jan 11 2020

Crossrefs

Cf. A329825, A255249, A330003 (complement).

Programs

  • Maple
    A330002 := proc(n)
        local x;
        x := -2*cos(5*Pi/7) ;
        floor(n*x) ;
    end proc: # R. J. Mathar, Jan 11 2020
  • Mathematica
    r = x /. FindRoot[1/x + 1/(x+1)^2 == 1, {x, 2, 10}, WorkingPrecision -> 120]
    RealDigits[r][[1]] (* A255249 *)
    Table[Floor[n*r], {n, 1, 250}]       (* A330002 *)
    Table[Floor[n*(1+r)^2], {n, 1, 250}] (* A330003 *)

Formula

a(n) = floor(n*x), where x = 1.24697960371... is the constant in A255249.

A369969 Numbers that are not multiples of 5, but their arithmetic derivative is.

Original entry on oeis.org

1, 6, 21, 26, 32, 36, 46, 51, 76, 86, 88, 91, 99, 106, 111, 112, 116, 126, 141, 146, 156, 161, 166, 192, 201, 206, 209, 216, 221, 226, 236, 242, 243, 248, 266, 272, 276, 279, 291, 301, 306, 308, 316, 319, 321, 326, 328, 346, 356, 369, 371, 381, 386, 391, 392, 406, 411, 429, 436, 441, 446, 456, 466, 471, 481, 488, 501
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2024

Keywords

Crossrefs

Intersection of A047201 and A327865.
Includes A050997 \ {3125} as a subsequence.
Cf. A003415, A369968 (characteristic function).
Cf. also A046337, A369659, A360110 for cases k=2, 3, 4 of "Nonmultiples of k whose arithmetic derivative is a multiple of k".

Programs

  • Maple
    filter:= proc(n) local F, np, t;
      if n mod 5 = 0 then return false fi;
      F:= ifactors(n)[2];
      np:= add(n*t[2]/t[1],t=F);
      np mod 5 = 0
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Dec 05 2024
  • PARI
    \\ See A369968.

A056907 Numbers k such that 36*k^2 + 12*k + 5 is prime (sorted by absolute values with negatives before positives).

Original entry on oeis.org

0, -1, 1, 2, -3, -6, 6, -8, -11, 11, 12, 14, -16, 16, 17, 19, -21, -23, -26, 27, -28, 32, -34, -36, 36, -39, 39, -41, 42, 44, -46, 46, -48, -49, 51, 52, -53, -58, 62, 64, 67, -68, -71, 71, -76, 77, 79, 81, -84, -89, 91, 96, -99, -101, 101, 102, -104, -111, 111, -113
Offset: 0

Views

Author

Henry Bottomley, Jul 07 2000

Keywords

Comments

36*k^2 + 12*k + 5 = (6*k+1)^2 + 4, which is four more than a square. Except for a(0), a(n) is never a multiple of 5.

Examples

			a(3)=2 since 36*2^2 + 12*2 + 5 = 173 which is prime (as well as being four more than a square).
		

Crossrefs

This sequence and formula, together with A056908 and its formula, generate all primes of the form k^2+4, i.e., A005473. Except for the first term, this sequence is a subsequence of A047201. Cf. A056900, A056902, A056904, A056906.

A152727 Smallest positive non-divisor of the n-th Fibonacci number (A000045).

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 7, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 3
Offset: 1

Views

Author

John W. Layman, Dec 11 2008

Keywords

Comments

Other values are a(840)=17 and a(12600)=37. Not all terms are prime; for example, the smallest non-divisor of F(2520) is 25.
It appears that the indices k for which a(n) is not prime are divisible by 2520 and that the sequence k/2520 is A047201. - Michel Marcus, Jul 10 2014

Crossrefs

Cf. A000045, A001651 (a(n)=2).

Programs

  • Maple
    f:= proc(n) local m,k;
    m:= combinat:-fibonacci(n);
    for k from 2 do if m mod k <> 0 then return k fi od:
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 06 2020
  • Mathematica
    a[n_] := Module[{f = Fibonacci[n], d}, For[d = 2, True, d++, If[!Divisible[f, d], Return[d]]]];
    Array[a, 100] (* Jean-François Alcover, Jul 24 2020 *)
  • PARI
    a(n) = my(f = fibonacci(n)); my(d = 2); while((f%d) == 0, d++); d; \\ Michel Marcus, Jul 10 2014
    
  • Sage
    def A152727(n) :
        d = 2
        f = fibonacci(n)
        while ((f % d) == 0) :
            d = d + 1
        return(d)
    [A152727(n) for n in (1..105)] # Jani Melik, Jul 10 2014
Previous Showing 31-40 of 52 results. Next